Struct syncbox::ArrayQueue [] [src]

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

A bounded, array-based queue, with compare-and-swap based operations.

Methods

impl<T: Send + 'static> ArrayQueue<T>

fn with_capacity(capacity: usize) -> ArrayQueue<T>

Constructs a new, empty ArrayQueue<T> with the specified capacity.

fn push(&self, value: T) -> Result<(), T>

Adds the element e to the queue if possible.

Errors

A call to push will fail if the queue is full; the provided element value is returned in the Err variant.

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

Takes from the queue if there is an element available.

Trait Implementations

impl<T: Send + 'static> Clone for ArrayQueue<T>

fn clone(&self) -> ArrayQueue<T>

1.0.0fn clone_from(&mut self, source: &Self)