amanieu/parking_lot

Compact and efficient synchronization primitives for Rust. Also provides an API for creating custom synchronization primitives.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 7 minutes ago
Type:Library / SDKCategory(s):Core & Utility LibrariesLanguages & Runtimes
Added to GitGenius on September 20th, 2026
Created on May 13th, 2016
Open Issues & Pull Requests: 83 (+0)
GitHub issues: Enabled
Number of forks: 278
Total Stargazers: 3,412 (+0)
Total Subscribers: 26 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 26.2 hours
Mean response time: 8.9 days
90th percentile: 10.9 days
Tracked items: 31

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 15
New in 7 days: 1
Closed in 7 days: 0
Avg open age: 318 days
Stale 30+ days: 13
Stale 90+ days: 10

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

Sign in to see which issues are moving.

Detailed Description

parking_lot is a synchronization primitives library for Rust that provides drop-in replacements for standard library mutexes, read-write locks, condition variables, and one-time initialization primitives, along with a low-level API for building custom synchronization types.

The library addresses the performance limitations of Rust's standard synchronization primitives by implementing more efficient algorithms. Its mutex and read-write lock implementations use a parking lot algorithm that reduces memory overhead and improves contention handling. The library also introduces a reentrant mutex type that allows a thread to acquire the same lock multiple times, a capability absent from the standard library. By exposing a core parking lot API, the tool enables developers to construct their own specialized synchronization primitives using the same efficient underlying mechanisms.

Developers should adopt this library when performance-critical code requires synchronization and standard library primitives become a bottleneck. It suits projects where lock contention is expected or where memory efficiency matters, such as high-concurrency servers or embedded systems with tight memory constraints. The primitives are designed as drop-in replacements, making migration straightforward for existing code. The reentrant mutex addresses specific use cases where recursive locking is necessary, eliminating the need for workarounds or alternative patterns.

The project maintains active development with regular updates and bug fixes. The codebase demonstrates careful attention to platform-specific optimizations and correctness across different architectures. The maintainers respond to issues and incorporate community feedback into releases. The library includes comprehensive documentation covering both the high-level synchronization primitives and the lower-level parking lot core API, reflecting a commitment to supporting both direct users and those building custom primitives on top of the foundation.