Skip to main content

Module async_runtime

Module async_runtime 

Source
Expand description

Executor-neutral task lifetimes and bounded delivery to the UI thread.

A scope is local authority. Only its producers, guarded publishers and task reporters can cross threads. A successful send means accepted, not delivered.

Structs§

AsyncLimits
Application resource limits. Counts do not bound the byte size of user values.
AsyncScope
Local lifetime controller. Cancellation revokes descendants before requesting task abortion. Keep a component’s scope from its mount context when handlers later receive contexts for child controls.
Closed
A rejected publication retains the caller’s value.
Completion
Single-use producer. Dropping it unused releases the callback on the UI turn.
GuardedPublisher
A shared property writer whose commit is atomic with lifetime revocation. Cloning this handle does not acquire another registration. Raw Property clones remain deliberately unguarded.
SendFuture
Capacity wait owned by one send attempt; dropping it unregisters its waker.
TaskControl
UI-owned task control; dropping it does not detach work from its scope.
TaskReporter
Transferable completion signal owned by an executor adapter. Drop means the task stopped without normal completion, usually after an abort request.
UiSender
Transferable producer for a bounded UI channel. Its callback stays local.
UiSubscription
Keeps a UI channel subscribed. Drop closes it and releases its local callback.

Enums§

AsyncError
New work was rejected before it could start or reserve resources.
TaskOutcome
The callback result keeps application Result<T, E> separate from a task panic.
TaskStatus
Observable task state. A cancellation request is not proof that work stopped.
TrySendError
A nonblocking channel send either retains the value or accepts it exactly once.

Traits§

AsyncScopeSource
A local owner that can bind work to its lifetime without exposing a node to an executor. Implemented by AppContext and runtime NodeContext.

Functions§

panic_message
Converts an unwinding panic into an observable task/callback failure.