#![cfg_attr(
test,
allow(
clippy::expect_used,
clippy::indexing_slicing,
clippy::panic,
clippy::unwrap_used
)
)]
#![doc = include_str!("../README.md")]
macro_rules! with_executor {
($($item:item)*) => {
$(
#[cfg(any(feature = "tokio", all(feature = "browser", target_family = "wasm")))]
$item
)*
};
}
mod bound;
#[cfg(all(feature = "browser", target_family = "wasm"))]
mod global;
mod timer;
with_executor! {
mod task;
mod task_set;
#[cfg(not(all(feature = "browser", target_family = "wasm")))]
pub use task::run_blocking;
pub use task::run_detached;
pub use task::spawn_detached;
pub use task::Abandoned;
pub use task::DetachedError;
pub use task::RuntimeUnavailable;
pub use task::Spawner;
pub use task::Unscheduled;
pub use task_set::Drained;
pub use task_set::Joined;
pub use task_set::TaskSet;
}
pub use bound::MaybeSend;
pub use bound::MaybeSendSync;
pub use timer::sleep;
pub use timer::TimerError;
pub use timer::UNBOUNDED_SLEEP;