Scope class final
Owns finalizers, resources, and child Scopes.
Scopes close children before their own finalizers and use reverse creation order throughout. Code that creates a Scope with Scope.make owns it and must call close. Runtime-managed execution Scopes are not exposed directly.
Properties
Methods
-
acquire<
R extends Object> (FutureOr< R> operation(), ResourceRelease<R> release) → Future<R> - Acquire a resource and atomically register its outcome-aware release.
-
addFinalizer(
ScopeFinalizer finalizer) → void - Register a finalizer that runs when this Scope closes.
-
close(
Exit< Object, Object> exit) → Future<void> - Close this Scope and every child Scope.
-
fork(
) → Scope - Create a child owned by this Scope.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited