arty_executor 0.6.0

Single-threaded async task executor for the Arty runtime.
Documentation

Arty Executor

crate.io docs.rs MSRV CI Coverage License

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.