1 //! Tools for working with tasks.
2 
3 #![no_std]
4 #![doc(test(
5     no_crate_inject,
6     attr(
7         deny(warnings, rust_2018_idioms, single_use_lifetimes),
8         allow(dead_code, unused_assignments, unused_variables)
9     )
10 ))]
11 #![warn(missing_docs, unsafe_op_in_unsafe_fn)]
12 
13 #[cfg(feature = "alloc")]
14 extern crate alloc;
15 #[cfg(feature = "std")]
16 extern crate std;
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