#stack #lockless #data-structures #treiber

treiber_stack

A lockless, thread-safe, atomic linked-list

3 stable releases

1.0.2 Jun 4, 2023
1.0.1 Jun 3, 2023

#856 in Concurrency

Download history 1/week @ 2024-02-16 17/week @ 2024-02-23 8/week @ 2024-03-01 1/week @ 2024-03-08 36/week @ 2024-03-29 3/week @ 2024-04-05 37/week @ 2024-04-12

76 downloads per month

MIT license

27KB
452 lines

treiber_stack - A Rust Treiber Stack

A concurrent, lockless linked list - the well-known, extremely useful Treiber stack data structure.

This is a handy data structure in any scenario where tasks on multiple threads "throw something over the wall" for later processing on another thread, where you can't afford blocking the thread in question due to contention.

To use, simply add to your Cargo.toml

treiber_stack = "0.1.0"

Check the latest version, but this library is unlikely to be updated often if ever - it is a simple data structure.

For background on why this library exists, see this Reddit thread.

Dependencies

~185KB