Skip to main content

Crate async_runtime

Crate async_runtime 

Source
Expand description

A priority-aware native async runtime for the smol ecosystem.

Runtime uses an async-task based scheduler with per-worker queues, global priority injectors, work stealing, and parking workers. LocalDomain uses async-executor and is driven explicitly by its host thread, allowing it to run !Send futures. Neither runtime owns or drives an I/O reactor.

Enable the stats feature to inspect an approximate [RuntimeStats] snapshot of routing, stealing, parking, wake, and queue counters.

Structs§

FallibleTask
A task handle that resolves to None if the task is cancelled.
LocalDomain
A thread-affine executor driven explicitly by the thread that creates it.
LocalSpawner
A capability for submitting Send work to a particular LocalDomain.
PriorityWeights
Relative scheduling opportunities assigned to each priority.
RunStats
Statistics from a time-budgeted LocalDomain drive.
Runtime
RuntimeBuilder
Spawner
Task
An awaitable task handle. Dropping it cancels the task.

Enums§

Priority
Scheduling priority for tasks in the general worker pool.
ShutdownError
An error raised while shutting down a general runtime.
ShutdownOutcome
The result of a shutdown operation with a deadline.
SpawnError
An error returned when a task cannot be accepted.