Struct syncbox::DelayQueue
[−]
[src]
pub struct DelayQueue<T: Delayed + Send> { // some fields omitted }
An unbounded blocking queue of delayed values. When a value is pushed onto the queue, a delay is included. The value will only be able to be popped off once the specified delay has expired. The head of the queue is the value whose delay is expired and furthest in the past.
Methods
impl<T: Delayed + Send> DelayQueue<T>
fn new() -> DelayQueue<T>
Constructs a new DelayQueue
.
fn poll_timeout(&self, timeout: Duration) -> Option<T>
Takes from the queue, blocking for up to timeout
.