WorkerBoundReference<T extends Any> class
A shared reference to a Kotlin object that doesn't freeze the referred object when it gets frozen itself.
After freezing can be safely passed between workers, but value can only be accessed on the worker WorkerBoundReference was created on, unless the referred object is frozen too.
Note: Garbage collector currently cannot free any reference cycles with frozen WorkerBoundReference in them.
To resolve such cycles consider using AtomicReference<WorkerBoundReference?>
which can be explicitly nulled out.
Constructors
- WorkerBoundReference(T value)
-
A shared reference to a Kotlin object
that doesn't freeze the referred object when it gets frozen itself.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → T
-
The referenced value.
final
- valueOrNull → T?
-
The referenced value or null if referred object is not frozen
and current worker is different from the one created this.
final
- worker → Worker
-
Worker that value is bound to.
final
Methods
-
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