1//! Tools for working with tasks.
2
3#![cfg_attr(not(feature = "std"), no_std)]
4#![warn(missing_debug_implementations, missing_docs, rust_2018_idioms, unreachable_pub)]
5// It cannot be included in the published code because this lints have false positives in the minimum required version.
6#![cfg_attr(test, warn(single_use_lifetimes))]
7#![doc(test(
8 no_crate_inject,
9 attr(
10 deny(warnings, rust_2018_idioms, single_use_lifetimes),
11 allow(dead_code, unused_assignments, unused_variables)
12 )
13))]
14
15#[cfg(feature = "alloc")]
16extern crate alloc;
17
18mod spawn;
19pub use crate::spawn::{LocalSpawn, Spawn, SpawnError};
20
21#[cfg(not(futures_no_atomic_cas))]
22#[cfg(feature = "alloc")]
23mod arc_wake;
24#[cfg(not(futures_no_atomic_cas))]
25#[cfg(feature = "alloc")]
26pub use crate::arc_wake::ArcWake;
27
28#[cfg(not(futures_no_atomic_cas))]
29#[cfg(feature = "alloc")]
30mod waker;
31#[cfg(not(futures_no_atomic_cas))]
32#[cfg(feature = "alloc")]
33pub use crate::waker::waker;
34
35#[cfg(not(futures_no_atomic_cas))]
36#[cfg(feature = "alloc")]
37mod waker_ref;
38#[cfg(not(futures_no_atomic_cas))]
39#[cfg(feature = "alloc")]
40pub use crate::waker_ref::{waker_ref, WakerRef};
41
42mod future_obj;
43pub use crate::future_obj::{FutureObj, LocalFutureObj, UnsafeFutureObj};
44
45mod noop_waker;
46pub use crate::noop_waker::noop_waker;
47pub use crate::noop_waker::noop_waker_ref;
48
49#[doc(no_inline)]
50pub use core::task::{Context, Poll, RawWaker, RawWakerVTable, Waker};
51