Releasing 0.5.0 of lfqueue - Lock-free MPMC queues

81 points Terikashi 17 comments

I've been working on a library for asynchronous signaling, something similar to tokio's Notify & NeoSmart's rsevents but for any asynchronous environment and more flexible.

Part of that required a good lock-free queue, and a paper called: "A Scalable, Portable, and Memory-Efficient Lock-Free FIFO Queue" grabbed my attention, so I've implemented that in Rust.

The library has great performance characteristics, but it does get beat out by crossbeam's queues at high contention. I plan on optimizing it further to try to make it better than those two, but for now I wanted to release it and get it out there.

I would appreciate any thoughts/feedback, and I hope this can help with some projects. The library features a no_std option; and there are both array-allocated & heap-allocated along with bounded & unbounded variants of the queue.

The crate can be found here:
https://github.com/DiscordJim/lfqueue

Cheers!