Expand description
Single-threaded async task executor for the Arty Runtime.
arty_executor is an internal part of the arty crate.
It registers, polls, wakes, cancels, and completes tasks. It also reports telemetry
and contains task panics. Applications use arty instead of this crate.
arty uses this crate to run async tasks. Application code uses the task and join
APIs from arty.
§Design
The executor runs on one thread. Run one executor on each thread that needs to execute
tasks. Only one executor can be alive on a thread. You can create a replacement after
you drop the previous executor. A runtime integration supplies a TaskCompletion
target when it registers a task.
A task ends when its future returns Poll::Ready, when it panics, or when
executor shutdown cancels it. The executor does not provide methods to
remove or cancel one task.
During steady operation, the executor reuses task storage and does not allocate.
A cloned task waker can outlive its task. After task completion or cancellation, the waker does nothing and cannot delay executor shutdown.
The executor contains task panics. Use
ExecutorBuilder::panic_policy to select
whether a task panic starts executor shutdown.
Structs§
- Executor
- An async task executor that runs on one thread.
- Executor
Builder - Builds an instance of
Executor. - Shutdown
- A handle that requests executor shutdown.
- Shutdown
Cause - Describes why executor shutdown started.
- Shutdown
Error - A cloneable error that caused executor shutdown.
- Task
Options - Lifecycle metadata for a task registered with
TaskSet. - TaskSet
- A handle that registers tasks with an executor.
Enums§
- Cycle
Outcome - The result of one executor processing cycle.
- Panic
Policy - Selects how the executor responds to a contained task panic.
- Task
Placement - Classifies how the submitter selected this executor for a task.
Traits§
- Task
Completion - Delivers a terminal task result. Each method consumes the target.
Functions§
- discard_
task_ panic_ payload - Drops a captured task panic without allowing its destructor to unwind.
Type Aliases§
- Task
Panic Payload - A panic captured while executing or disposing an executor task.