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]
pub fn new() -> TreiberStack<T>
[src]
Create a new, empty stack.
pub fn push(&self, t: T)
[src]
Push t
on top of the stack.
pub fn pop(&self) -> Option<T>
[src]
Attempt to pop the top element of the stack. Deprecated method, use try_pop
Returns None
if the stack is observed to be empty.
pub fn try_pop(&self) -> Option<T>
[src]
Attempt to pop the top element of the stack.
Returns None
if the stack is observed to be empty.
pub fn is_empty(&self) -> bool
[src]
Check if this queue is empty.
Trait Implementations
impl<T: Debug> Debug for TreiberStack<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more