Skip to main content

Crate arty_executor

Crate arty_executor 

Source
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.
ExecutorBuilder
Builds an instance of Executor.
Shutdown
A handle that requests executor shutdown.
ShutdownCause
Describes why executor shutdown started.
ShutdownError
A cloneable error that caused executor shutdown.
TaskOptions
Lifecycle metadata for a task registered with TaskSet.
TaskSet
A handle that registers tasks with an executor.

Enums§

CycleOutcome
The result of one executor processing cycle.
PanicPolicy
Selects how the executor responds to a contained task panic.
TaskPlacement
Classifies how the submitter selected this executor for a task.

Traits§

TaskCompletion
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§

TaskPanicPayload
A panic captured while executing or disposing an executor task.