WASIComponentWaitableHost class final

Table-backed host for canonical waitable-set operations.

Constructors

WASIComponentWaitableHost({WASIComponentResourceTable? table, Iterable<WASIComponentWaitableResolver> waitableResolvers = const []})
Creates a waitable host backed by table or a new resource table.

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasPendingTaskCancellation → bool
Whether a cancellable wait or poll can observe task cancellation.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
table → WASIComponentResourceTable
Resource table used for waitables and waitable sets.
final

Methods

addWaitableResolver(WASIComponentWaitableResolver resolver) → void
Adds a resolver for waitables owned by another component host layer.
bindCanonicalDefinition(WasmComponentCanonicalDefinition definition) → WASIComponentCanonicalWaitableOperation
Binds a decoded canonical waitable-set definition.
bindCanonicalDefinitions(WasmComponent component) → WASIComponentCanonicalWaitableProgram
Binds all decoded canonical waitable-set definitions in component.
createWaitable(String name) → int
Creates a waitable handle with a debug name.
deliverTaskCancellation() → bool
Delivers pending cancellation to the current task once.
dropWaitable(int waitable) → void
Drops a host-created waitable handle.
insertWaitable(WASIComponentWaitable waitable) → int
Inserts a waitable and returns its component table handle.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
releaseTask(Object task) → void
Releases cancellation state retained for a resolved task.
requestTaskCancellation([Object? task]) → void
Requests cancellation of the current component task.
runWithTask<T>(Object task, T callback()) → T
Runs callback with task-local cancellation delivery for task.
runWithTaskAsync<T>(Object task, Future<T> callback()) → Future<T>
Runs callback with task-local cancellation delivery for task until it completes, then releases the task's cancellation state.
toString() → String
A string representation of this object.
inherited
waitableJoin(int waitable, int waitableSet) → void
Executes waitable.join.
waitableSetDrop(int waitableSet) → void
Executes waitable-set.drop.
waitableSetNew() → int
Executes waitable-set.new.
waitableSetPollToMemory(int waitableSet, Memory memory, int pointer, {bool cancellable = false}) → int
Executes waitable-set.poll.
waitableSetWait(int waitableSet, {bool cancellable = false}) → Future<WASIComponentWaitableEvent>
Executes waitable-set.wait.
waitableSetWaitToMemory(int waitableSet, Memory memory, int pointer, {bool cancellable = false}) → Future<int>
Executes waitable-set.wait and writes its payload to memory.

Operators

operator ==(Object other) → bool
The equality operator.
inherited