2019-08-17 23:34:25 -07:00
|
|
|
#![doc(html_root_url = "https://docs.rs/tokio-sync/0.2.0-alpha.2")]
|
2019-08-10 00:07:57 +09:00
|
|
|
#![warn(
|
2019-05-14 10:27:36 -07:00
|
|
|
missing_debug_implementations,
|
|
|
|
|
missing_docs,
|
2019-08-11 04:28:52 +09:00
|
|
|
rust_2018_idioms,
|
|
|
|
|
unreachable_pub
|
2019-05-14 10:27:36 -07:00
|
|
|
)]
|
|
|
|
|
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
|
2019-01-22 11:37:26 -08:00
|
|
|
|
|
|
|
|
//! Asynchronous synchronization primitives.
|
|
|
|
|
//!
|
|
|
|
|
//! This crate provides primitives for synchronizing asynchronous tasks.
|
|
|
|
|
|
|
|
|
|
macro_rules! debug {
|
|
|
|
|
($($t:tt)*) => {
|
|
|
|
|
if false {
|
|
|
|
|
println!($($t)*);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro_rules! if_fuzz {
|
|
|
|
|
($($t:tt)*) => {{
|
|
|
|
|
if false { $($t)* }
|
|
|
|
|
}}
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-06 13:54:56 -07:00
|
|
|
mod lock;
|
2019-01-22 11:37:26 -08:00
|
|
|
mod loom;
|
|
|
|
|
pub mod mpsc;
|
2019-02-21 11:56:15 -08:00
|
|
|
pub mod oneshot;
|
2019-01-22 11:37:26 -08:00
|
|
|
pub mod semaphore;
|
2019-08-06 13:54:56 -07:00
|
|
|
mod task;
|
2019-02-22 21:54:50 -08:00
|
|
|
pub mod watch;
|
2019-08-06 13:54:56 -07:00
|
|
|
|
|
|
|
|
pub use lock::{Lock, LockGuard};
|
|
|
|
|
pub use task::AtomicWaker;
|