Girls Just Wanna Have Fast MPMC Queues with bounded waiting · Nahla
Disclaimer: An earlier version of this post claimed the structure is wait-free, this is incorrect. Being wait-free requires that failure or suspension of any thread can’t cause failure or suspension of another thread. This queue in fact does not fulfill that requirement. The main section which discusses the wait bounds of queue operations has been amended to reflect this, but other parts of this article have not been. As such there may parts of the text which refer to this as a wait-free queue, which it is not. I chose to keep those sections to avoid rewriting chunks of this post after it was already posted. Thanks for the correction Reddit user matthieum! After my last post I started working on writing a data structure to facilitate sharing a buffer mutably between multiple threads. One tangent lead to another and that lead to me getting really into lock-free data structures so I decided I wanted to make a wait-free queue. This thing seems decently fast to me and I’m proud of it so I
Fri, Jul 10, 2026 Disclaimer: An earlier version of this post claimed the structure is wait-free, this is incorrect. Being wait-free requires that failure or suspension of any thread can’t cause failure or suspension of another thread. This queue in fact does not fulfill that requirement. The main section which discusses the wait bounds of queue operations has been amended to reflect this, but other parts of this article have not been. As such there may be parts of the text which refer to this as a wait-free queue, which it is not. I chose to keep those sections to avoid rewriting chunks of…
saved by
related reading
- Locking in WebKit | WebKitwebkit.org
- Reading 16: Mutual Exclusionweb.mit.edu
- Non-blocking algorithm - Wikipediaen.wikipedia.org
- Problem Set 4: Memory Scrambleweb.mit.edu
- Queues Don't Fix Overloadferd.ca
- LittleBookOfSemaphores.pdfgreenteapress.com
- Queue (abstract data type) - Wikipediaen.wikipedia.org
- 🕖Waitlistsread.first1000.co
- GitHub - joelparkerhenderson/queueing-theory: Queueing theory: an introduction for software developmentgithub.com
- Low Latency Java with the Disruptorblog.scottlogic.com
- Measuring Mutexes, Spinlocks and how Bad the Linux Scheduler Really is | Probably Danceprobablydance.com
- LMAX Disruptor v4.0.0 - Nick Palmer - palmr.co.ukpalmr.co.uk