async_lock/lib.rs
1//! Async synchronization primitives.
2//!
3//! This crate provides the following primitives:
4//!
5//! * [`Barrier`] - enables tasks to synchronize all together at the same time.
6//! * [`Mutex`] - a mutual exclusion lock.
7//! * [`RwLock`] - a reader-writer lock, allowing any number of readers or a single writer.
8//! * [`Semaphore`] - limits the number of concurrent operations.
9
10#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
11
12mod barrier;
13mod mutex;
14mod once_cell;
15mod rwlock;
16mod semaphore;
17
18pub use barrier::{Barrier, BarrierWaitResult};
19pub use mutex::{Mutex, MutexGuard, MutexGuardArc};
20pub use once_cell::OnceCell;
21pub use rwlock::{RwLock, RwLockReadGuard, RwLockUpgradableReadGuard, RwLockWriteGuard};
22pub use semaphore::{Semaphore, SemaphoreGuard, SemaphoreGuardArc};