Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ffi] Update comment for NativeFinalizer #53306

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions sdk/lib/ffi/native_finalizer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,14 @@ typedef NativeFinalizerFunction
///
/// Compared to the [Finalizer] from `dart:core`, which makes no promises to
/// ever call an attached callback, this native finalizer promises that all
/// attached finalizers are definitely called at least once before the program
/// ends, and the callbacks are called as soon as possible after an object
/// is recognized as inaccessible.
/// attached finalizers are definitely called at least once before the isolate
/// group shuts down, and the callbacks are called as soon as possible after
/// an object is recognized as inaccessible.
///
/// Note that an isolate group is not necessarily guaranteed to shutdown
/// normally as the whole process might crash or be abruptly terminated
/// by a function like `exit`. This means `NativeFinalizer` can not be
/// relied upon for running actions on the programs exit.
///
/// When the callback is a Dart function rather than a native function, use
/// [Finalizer] instead.
Expand Down
Loading