Skip to content

Commit f9b304d

Browse files
author
Stjepan Glavina
committed
Add semaphore and barrier
1 parent c48146c commit f9b304d

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ categories = ["asynchronous", "concurrency"]
1313
readme = "README.md"
1414

1515
[dependencies]
16-
async-mutex = "1.1.5"
17-
async-rwlock = "1.0.1"
16+
async-barrier = "1.0.0"
17+
async-mutex = "1.2.0"
18+
async-rwlock = "1.1.0"
19+
async-semaphore = "1.0.0"

src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
//! Async locking primitives.
22
//!
3-
//! This crate provides two primitives:
3+
//! This crate provides the following primitives:
44
//!
5+
//! * [`Barrier`] - enables tasks to synchronize all together at the same time.
56
//! * [`Mutex`] - a mutual exclusion lock.
67
//! * [`RwLock`] - a reader-writer lock, allowing any number of readers or a single writer.
8+
//! * [`Semaphore`] - limits the number of concurrent operations.
79
810
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
911

1012
#[doc(inline)]
11-
pub use {
12-
async_mutex::{Mutex, MutexGuard},
13-
async_rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard},
14-
};
13+
pub use {async_barrier::*, async_mutex::*, async_rwlock::*, async_semaphore::*};

0 commit comments

Comments
 (0)