You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently have a Finalizable interface that serves two purposes:
It keeps objects alive until the end of the syntactic scope.
It can have NativeFinalizers attached.
Due to (2), we disallow sending objects implementing Finalizable to other isolates. As that that will most likely be an error.
However, when attaching finalizers via the dart_api.h, we also need the behavior of (1), and we actually want to send objects to other isolates (that's why we resorted to using finalizers from the dart_api.h in the first place.)
We should introduce another marker interface that only has behavior 1.
Maybe the interfaces should even be related.
Ready for bike shedding on the name:
a. KeepAlive
b. IsolateGroupFinalizable
The marker interface should probably live in dart:ffi as well. Because it's mostly used when sending objects via FFI with Handles. Also it would enable relating the two interfaces, helping with documentation. But I can be convinced of other options.
We currently have a
Finalizable
interface that serves two purposes:NativeFinalizer
s attached.Due to (2), we disallow sending objects implementing
Finalizable
to other isolates. As that that will most likely be an error.However, when attaching finalizers via the
dart_api.h
, we also need the behavior of (1), and we actually want to send objects to other isolates (that's why we resorted to using finalizers from thedart_api.h
in the first place.)We should introduce another marker interface that only has behavior 1.
Maybe the interfaces should even be related.
Ready for bike shedding on the name:
a.
KeepAlive
b.
IsolateGroupFinalizable
The marker interface should probably live in
dart:ffi
as well. Because it's mostly used when sending objects via FFI withHandle
s. Also it would enable relating the two interfaces, helping with documentation. But I can be convinced of other options.Use case:
cc @HosseinYousefi @mkustermann
The text was updated successfully, but these errors were encountered: