Trait syncbox::SyncQueue
[−]
[src]
pub trait SyncQueue<T: Send>: Queue<T> {
fn take(&self) -> T;
fn put(&self, e: T);
}An interface for synchronous queues of elements of type T.
This extends Queue with blocking analogs of poll and offer. Both
take and put will block the calling thread until the operation
succeeds.
Required Methods
fn take(&self) -> T
Takes from the queue, blocking until there is an element available.
fn put(&self, e: T)
Adds the element e to the queue, blocking until it can be added.
Implementors
impl<T: Delayed + Send> SyncQueue<T> for DelayQueue<T>impl<T: Send> SyncQueue<T> for LinkedQueue<T>