pinToCurrentThread static method
- @Since.new("3.13")
Pin current isolate to the current OS thread.
Once an isolate is pinned to an OS thread it cannot be entered by any other OS thread. An attempt to acquire exclusive access to it from another thread will fail with an error.
Equivalent to Dart_SetCurrentThreadOwnsIsolate Dart VM C API.
Returns true on success and false otherwise (e.g. if target isolate
is already pinned to another thread).
Implementation
@Since("3.13")
external static bool pinToCurrentThread();