Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Lockfree.Michael_scott_queue
SourceMichael-Scott Queue. A classic multi-producer multi-consumer queue, robust and flexible. Recommended starting point when needing FIFO structure. It is inspired by Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue Algorithms.
The type of lock-free queue.
pop q
pops an element e
from the front of the queue and returns Some v
if the queue is non-empty. Otherwise, returns None
.
clean_until q f
drops the prefix of the queue until the element e
, where f e
is true
. If no such element exists, then the queue is emptied.
The type of cursor.
Obtain a snapshot of the queue. This is a constant time operation.