Struct syncbox::LinkedQueue [] [src]

pub struct LinkedQueue<T: Send> {
    // some fields omitted
}

A queue in which values are contained by a linked list.

The current implementation is based on a mutex and two condition variables. It is also mostly a placeholder until a lock-free version is implemented, so it has not been tuned for performance.

Methods

impl<T: Send> LinkedQueue<T>

fn new() -> LinkedQueue<T>

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

fn len(&self) -> usize

fn is_empty(&self) -> bool

fn offer(&self, e: T) -> Result<(), T>

fn offer_ms(&self, e: T, ms: u32) -> Result<(), T>

fn put(&self, e: T)

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

fn poll_ms(&self, ms: u32) -> Option<T>

fn take(&self) -> T

Takes from the queue, blocking until there is an element available.

Trait Implementations

impl<T: Send> Queue<T> for LinkedQueue<T>

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

fn is_empty(&self) -> bool

fn offer(&self, e: T) -> Result<(), T>

impl<T: Send> SyncQueue<T> for LinkedQueue<T>

fn take(&self) -> T

fn put(&self, e: T)

impl<T: Send> Clone for LinkedQueue<T>

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

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