UnloadInstruction<T> class
The MemoryAction.unload capability: flush, detach, stop emitting.
When to use
- Standard Teardown: the default handler — flushes a dirty value, detaches the upstream wiring, and stops emitting while the durable record remains.
- Interposition: subclass and override handle to observe or gate unload commands.
- Replacement: override unloadTurn to own the teardown contract.
How it works
handle enqueues unloadTurn on the runtime's mailbox and resumes the receptor continuation exactly once when the turn completes. The flush barrier routes through the catalog's save capability, and the unwiring through its detach capability.
Non-obvious
- The flush runs even under the explicit policy — unload is a barrier, not a scheduled write.
- Inheritance
-
- Object
- MemoryInstructionBase<
T> - UnloadInstruction
Constructors
- UnloadInstruction()
- Creates the default unload instruction.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
Pulse pulse, {MemoryCell< T> ? cell, void future({required Pulse? result, required dynamic token})?, dynamic token}) → Pulse? -
Executes the transformation logic of this instruction synchronously.
inherited
-
handle(
Pulse pulse, {MemoryCell< T> ? cell, dynamic user, void future({required Pulse? result, required dynamic token})?, dynamic token}) → Pulse? -
Runs this capability's action for
pulseoncell.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unloadTurn(
MemoryCell< T> cell) → Future<void> - One teardown turn: flush-if-dirty, detach, stop emitting.
Operators
-
operator +(
covariant Instruction< Cell, Pulse, Pulse> other) → Instruction<MemoryCell< T> , Pulse, Pulse> -
Combines this instruction with another to create an
InstructionChain.inherited -
operator ==(
Object other) → bool -
The equality operator.
inherited