# parking_lot

> Compact, fast mutexes, read-write locks and condition variables for Rust

Source: https://talira.ai/catalog/parking-lot-d6s7dv5m
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / concurrency](https://talira.ai/categories/libraries/concurrency), [languages / rust](https://talira.ai/categories/languages/rust)
- Licence: MIT OR Apache-2.0[^2][^3][^4]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Backed by: [Amanieu d'Antras](https://talira.ai/orgs/amanieu-dantras.md)

parking_lot is a Rust crate by Amanieu d'Antras with compact, fast versions of the standard synchronization primitives: Mutex, RwLock, RecursiveRwLock, Condvar, Once and ReentrantMutex. A Mutex or Once takes one byte and a Condvar or RwLock one word, uncontended locking is a single atomic operation, and locks spin briefly before parking the thread. Thread queuing lives in a shared parking lot (after WebKit's WTF::ParkingLot), and its lock_api and parking_lot_core crates let you build your own primitives.

## Links

- GitHub: https://github.com/Amanieu/parking_lot
- Docs: https://docs.rs/parking_lot/

## Problems it solves

- make lock contention cheaper in my multithreaded Rust program
- use smaller, faster mutexes than the Rust standard library's
- upgrade a read lock to a write lock in Rust without releasing it

## Features

- Mutex and Once in 1 byte, Condvar and RwLock in 1 word
- Uncontended lock and unlock in a single atomic operation
- Adaptive spinning before parking the thread
- Task-fair RwLock with downgradable and upgradable read locks
- Condvar without spurious wakeups
- Optional deadlock detection and serde support

## Limitations

- Its deadlock detector is experimental and disabled by default[^1]

## Trust

Overall: 0.61 out of 1.
Signals: maintenance 0.85, adoption 0.71, momentum 0.44, community 0.85, backing 0.30, extensibility 0.00.

- last commit 39 days ago
- 63 commits in the last 90 days
- latest release parking_lot-v0.13.0 39 days ago
- 3.5k GitHub stars
- 130 contributors
- backed by Amanieu d'Antras

## Alternatives

- [DashMap](https://talira.ai/catalog/dashmap-tmv09epx.md): Blazing fast concurrent HashMap for Rust
- [Crossbeam](https://talira.ai/catalog/crossbeam-vgjk9mk6.md): Tools for concurrent programming in Rust: channels, queues, atomics and scoped threads

## Sources

[^1]: https://github.com/Amanieu/parking_lot/blob/master/README.md (checked 27 Nov 2026)
[^2]: https://github.com/Amanieu/parking_lot/blob/master/LICENSE-APACHE (checked 27 Nov 2026)
[^3]: https://github.com/Amanieu/parking_lot/blob/master/Cargo.toml (checked 27 Nov 2026)
[^4]: https://github.com/Amanieu/parking_lot/blob/master/LICENSE-MIT (checked 27 Nov 2026)
