Struct crossbeam::sync::SegQueue [] [src]

pub struct SegQueue<T> {
    // some fields omitted
}

A Michael-Scott queue that allocates "segments" (arrays of nodes) for efficiency.

Usable with any number of producers and consumers.

Methods

impl<T> SegQueue<T>
[src]

fn new() -> SegQueue<T>

Create a new, empty queue.

fn push(&self, t: T)

Add t to the back of the queue.

fn try_pop(&self) -> Option<T>

Attempt to dequeue from the front.

Returns None if the queue is observed to be empty.

Trait Implementations

Derived Implementations

impl<T: Debug> Debug for SegQueue<T>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.