Struct crossbeam::sync::MsQueue
[−]
[src]
pub struct MsQueue<T> { /* fields omitted */ }A Michael-Scott lock-free queue, with support for blocking pops.
Usable with any number of producers and consumers.
Methods
impl<T> MsQueue<T>[src]
impl<T> MsQueue<T>pub fn new() -> MsQueue<T>[src]
pub fn new() -> MsQueue<T>Create a new, empty queue.
pub fn push(&self, t: T)[src]
pub fn push(&self, t: T)Add t to the back of the queue, possibly waking up threads
blocked on pop.
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolCheck if this queue is empty.
pub fn try_pop(&self) -> Option<T>[src]
pub fn try_pop(&self) -> Option<T>Attempt to dequeue from the front.
Returns None if the queue is observed to be empty.
pub fn pop(&self) -> T[src]
pub fn pop(&self) -> TDequeue an element from the front of the queue, blocking if the queue is empty.