Crate cc_queue [−] [src]
cc-queue
A CC Queue, which is:-
- Non-blocking
- Thread-safe
- Concurrent
- Unbounded
- Faster than the MSQueue (Michael-Scott Queue, as used in Java)
And suitable for use with multiple memory allocators, including ones that use persistent memory.
To use it
- Create a new instance of
CCQueue
. - Create a handle per-thread using
CCQueue.new_per_thread_handle()
. - Enqueue and dequeue
Notes on the API
The API may need to change to make it easier to manage the per-thread handle objects.
Modules
allocators |
Allocators allow customization of the backing memory used by this queue. One use case is to be able to use persistent memory. |
Structs
CcQueue |
This is the cc queue object.
It is safe to send references between threads.
Each thread accessing the queue should call |
PerQueueThreadHandle |
This structure is allocated for each thread that wants to access a queue. |