Files
tokio/tokio-sync/src/lib.rs
T

49 lines
949 B
Rust
Raw Normal View History

2019-04-22 15:12:25 -07:00
#![doc(html_root_url = "https://docs.rs/tokio-sync/0.1.5")]
2019-05-14 10:27:36 -07:00
#![deny(
missing_debug_implementations,
missing_docs,
unreachable_pub,
rust_2018_idioms
)]
#![cfg_attr(test, deny(warnings))]
2019-05-14 10:27:36 -07:00
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
//! Asynchronous synchronization primitives.
//!
//! This crate provides primitives for synchronizing asynchronous tasks.
macro_rules! debug {
($($t:tt)*) => {
if false {
println!($($t)*);
}
}
}
2019-06-24 12:34:30 -07:00
/// Unwrap a ready value or propagate `Poll::Pending`.
#[macro_export]
macro_rules! ready {
($e:expr) => {{
use std::task::Poll::{Pending, Ready};
match $e {
Ready(v) => v,
Pending => return Pending,
}
}};
}
macro_rules! if_fuzz {
($($t:tt)*) => {{
if false { $($t)* }
}}
}
pub mod lock;
mod loom;
pub mod mpsc;
2019-02-21 11:56:15 -08:00
pub mod oneshot;
pub mod semaphore;
pub mod task;
pub mod watch;