Struct syncbox::LinkedQueue
[−]
[src]
pub struct LinkedQueue<T: Send> { /* 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>
[src]
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>
[src]
fn poll(&self) -> Option<T>
Retrieves and removes the head of this queue or returns None if the queue is empty. Read more
fn is_empty(&self) -> bool
Returns true if the underlying data structure does not contain any elements. Read more
fn offer(&self, e: T) -> Result<(), T>
impl<T: Send> SyncQueue<T> for LinkedQueue<T>
[src]
fn take(&self) -> T
Retrieves and removes the head of this queue, waiting if necessary until an element becomes available. Read more
fn put(&self, e: T)
impl<T: Send> Clone for LinkedQueue<T>
[src]
fn clone(&self) -> LinkedQueue<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more