Struct crossbeam::sync::TreiberStack
[−]
[src]
pub struct TreiberStack<T> { /* fields omitted */ }
Treiber's lock-free stack.
Usable with any number of producers and consumers.
Methods
impl<T> TreiberStack<T>
[src]
fn new() -> TreiberStack<T>
Create 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. Deprecated method, use try_pop
Returns None
if the stack is observed to be empty.
fn try_pop(&self) -> Option<T>
Attempt to pop the top element of the stack.
Returns None
if the stack is observed to be empty.
fn is_empty(&self) -> bool
Check if this queue is empty.