Herlihy-Wing queue
A lock-free queue data structure based on CAS operations, designed for high-throughput concurrency without locks.
The Herlihy-Wing queue is a classic lock-free data structure introduced by Maurice Herlihy and Jeannette Wing in the 1980s. It uses compare-and-swap operations to coordinate threads without acquiring locks, achieving high performance on multi-core systems. Instead of explicit mutexes, the structure guarantees atomicity through carefully choreographed CAS sequences, making it attractive for low-latency systems.
Modern lock-free queues often build on these same principles but with optimizations for contemporary CPU architectures. The Treiber stack applies similar techniques to stack-based data structures.