Struct crossbeam::sync::TreiberStack [] [src]

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

Treiber's lock-free stack.

Usable with any number of producers and consumers.

Methods

impl<T> TreiberStack<T>

fn new() -> TreiberStack<T>

Crate a new, empty stack.

fn push(&self, t: T)

Push t on top of the stack.

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

Attempt to pop the top element of the stack.

Returns None if the stack is observed to be empty.