Registry / async / parking-lot

parking-lot

JSON →
library0.12.5rscratesunverified

More compact and efficient implementations of the standard synchronization primitives.

# Cargo.toml [dependencies] parking_lot = "0.12.5"
INSTALL
IMPORT
SIG · PARKING-LOT
P
parking-lot
asyncrustv0.12.5
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 parking_lot::Mutex;

Creates a mutex-protected integer and increments it.

use parking_lot::Mutex; use std::sync::Arc; fn main() { let data = Arc::new(Mutex::new(0)); let mut guard = data.lock(); *guard += 1; println!("{}", *guard); }
Debug
Known issues
gotchaparking_lot::Mutex is not compatible with std::sync::Mutex in generic contexts; it uses a different API.
fix
Use `parking_lot::Mutex` directly; avoid mixing with std mutexes.
affects: *
Upgrade
Version history
0.12.5latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
26 hits · last 30 days
node
24
Resources
parking-lot — cargo add parking-lot · libregistry