parking_lot

Compact and efficient synchronization primitives for Rust. Also provides an API for creating custom synchronization primitives. (by Amanieu)

Parking_lot Alternatives

Similar projects and alternatives to parking_lot

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better parking_lot alternative or higher similarity.

parking_lot reviews and mentions

Posts with mentions or reviews of parking_lot. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-07-27.
  • How fair should an unfair mutex be?
    1 project | /r/rust | 27 Aug 2023
    Recently I've been developing my own mutex using a lot of inspiration from the excellent parking_lot crate. The mutex in parking_lot is eventually fair in that it occasionally does a fair unlock to ensure threads aren't completely starved.
  • Which Mutex to use in this case (independent tasks, partially under contention)
    3 projects | /r/rust | 27 Jul 2022
    parking_lot still has an open issue #201: Heavily degraded performance while in extreme contention on some processors which reveals that parking_lot selfishly uses spinning locks under some circumstances to sacriice total system efficiency in the name of trying to improve its own latency. In my opinion, the only place spinning locks are excusable is fullscreen games and, even then, Linus Torvalds is of the opinion they're usually implemented wrong. (Issue 201 also includes a bunch of benchmark runs if you want to read through to figure out which one applies to the current shipping state of the codebase.)
  • Why Rust mutexes look like they do
    2 projects | /r/rust | 2 Apr 2022
    I think there was at some point the plan to make it the std implementation. However, cross platform support was kinda tricky if I remember link to an issue. I tend to suggest to always first prototype with std primitives. Often your bottlenecks are in totally different places. For example, you wait on some data C that also waits on data B but this depends on A which is a really slow query to a database.
  • How to call RawRwLock.lock_exclusive() of parking_lot?
    1 project | /r/rust | 9 Mar 2022
  • Parking_lot: Compact and efficient synchronization primitives for Rust
    1 project | news.ycombinator.com | 2 Jul 2021
  • A Firehose of Rust, for busy people who know some C++
    1 project | /r/rust | 1 Jun 2021
    I think the current state-of-the-art in terms of high-performance, general-purpose mutexes is parking_lot. (Which was ported from a C++ project of the same name.) Rather than initializing a new underlying pthread_mutex for every instance of Mutex, it keeps a global collection of thread parking queues somewhere, which turns out to be more efficient in various ways. An individual parking_lot::Mutex doesn't require a heap allocation, and is just 1 byte in size (plus the size of T).
  • Eliminating Data Races in C++ and Rust with Thread Sanitizer in Firefox – A Technical Report
    2 projects | /r/rust | 7 Apr 2021
    The first was bug 1674770, which was a bug in the parking_lot library. This Rust library provides synchronization primitives and other concurrency tools and is written and maintained by experts. We did not investigate the impact but the issue was a couple atomic orderings being too weak and was fixed quickly by the authors. This is yet another example that proves how difficult it is to write bug-free concurrent code.
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 28 Apr 2024
    Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →

Stats

Basic parking_lot repo stats
7
2,532
7.2
3 days ago

Amanieu/parking_lot is an open source project licensed under Apache License 2.0 which is an OSI approved license.

The primary programming language of parking_lot is Rust.

Popular Comparisons


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com