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" )] |
16 | extern crate alloc; |
17 | |
18 | mod spawn; |
19 | pub use crate::spawn::{LocalSpawn, Spawn, SpawnError}; |
20 | |
21 | #[cfg_attr (target_os = "none" , cfg(target_has_atomic = "ptr" ))] |
22 | #[cfg (feature = "alloc" )] |
23 | mod arc_wake; |
24 | #[cfg_attr (target_os = "none" , cfg(target_has_atomic = "ptr" ))] |
25 | #[cfg (feature = "alloc" )] |
26 | pub use crate::arc_wake::ArcWake; |
27 | |
28 | #[cfg_attr (target_os = "none" , cfg(target_has_atomic = "ptr" ))] |
29 | #[cfg (feature = "alloc" )] |
30 | mod waker; |
31 | #[cfg_attr (target_os = "none" , cfg(target_has_atomic = "ptr" ))] |
32 | #[cfg (feature = "alloc" )] |
33 | pub use crate::waker::waker; |
34 | |
35 | #[cfg_attr (target_os = "none" , cfg(target_has_atomic = "ptr" ))] |
36 | #[cfg (feature = "alloc" )] |
37 | mod waker_ref; |
38 | #[cfg_attr (target_os = "none" , cfg(target_has_atomic = "ptr" ))] |
39 | #[cfg (feature = "alloc" )] |
40 | pub use crate::waker_ref::{waker_ref, WakerRef}; |
41 | |
42 | mod future_obj; |
43 | pub use crate::future_obj::{FutureObj, LocalFutureObj, UnsafeFutureObj}; |
44 | |
45 | mod noop_waker; |
46 | pub use crate::noop_waker::noop_waker; |
47 | pub use crate::noop_waker::noop_waker_ref; |
48 | |
49 | #[doc (no_inline)] |
50 | pub use core::task::{Context, Poll, RawWaker, RawWakerVTable, Waker}; |
51 | |