Registry / async / async-lock

async-lock

JSON →
library3.4.2rscratesunverified

Async synchronization primitives for Rust.

# Cargo.toml [dependencies] async-lock = "3.4.2"
INSTALL
IMPORT
SIG · ASYNC-LOCK
A
async-lock
asyncrustv3.4.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Mutex
use async_lock::Mutex;

Demonstrates using async_lock::Mutex in an async context.

use async_lock::Mutex; #[tokio::main] async fn main() { let m = Mutex::new(0); let mut guard = m.lock().await; *guard += 1; println!("Value: {}", *guard); }
Debug
Known issues
gotchaRequires an async runtime (e.g., tokio, async-std) to work.
fix
Add a runtime dependency and use #[tokio::main] or similar.
affects: >=3.0.0
Upgrade
Version history
3.4.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
48 hits · last 30 days
node
40
Resources
async-lock — cargo add async-lock · libregistry