mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-09 00:00:08 +02:00
tokio-sync: Add async mutual exclusion primitive (#964)
This PR introduces `Lock`: A concurrency primitive built on top of `Semaphore` that provides a `Mutex`-like primitive that interacts nicely with futures. Specifically, `LockGuard` (in contrast to `MutexGuard`) does _not_ borrow the `Lock`, and can thus be passed into a future where it will later be unlocked. This replaces #958, which attempted to introduce a less generic version. The primitive proposed there will instead live in [`async-lease`](https://github.com/jonhoo/async-lease).
This commit is contained in:
committed by
Lucio Franco
parent
7e51ab05e9
commit
cf06621998
@@ -66,6 +66,7 @@ jobs:
|
||||
- timer
|
||||
- udp
|
||||
- uds
|
||||
- sync
|
||||
tokio-buf:
|
||||
- util
|
||||
|
||||
|
||||
Reference in New Issue
Block a user