1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// TODO(doc-coverage): remove once `missing_docs` is promoted to [workspace.lints.rust].
//! Single-threaded async task executor for the Arty Runtime.
//!
//! `arty_executor` is an internal part of the [`arty`](https://docs.rs/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`](crate::ExecutorBuilder::panic_policy) to select
//! whether a task panic starts executor shutdown.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use TaskCompletion;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;