1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
macro_rules! ready {
($e:expr) => {{
use ::core::task::Poll;
match $e {
Poll::Ready(v) => v,
Poll::Pending => return Poll::Pending,
}
}};
}
mod barrier;
mod mutex;
mod once_cell;
mod rwlock;
mod semaphore;
pub use barrier::{Barrier, BarrierWaitResult};
pub use mutex::{Mutex, MutexGuard, MutexGuardArc};
pub use once_cell::OnceCell;
pub use rwlock::{RwLock, RwLockReadGuard, RwLockUpgradableReadGuard, RwLockWriteGuard};
pub use semaphore::{Semaphore, SemaphoreGuard, SemaphoreGuardArc};
pub mod futures {
pub use crate::barrier::BarrierWait;
pub use crate::mutex::{Lock, LockArc};
pub use crate::rwlock::{Read, UpgradableRead, Upgrade, Write};
pub use crate::semaphore::{Acquire, AcquireArc};
}