Add DelayQueue implementation to tokio-timer (#550)

This patch adds a `DelayQueue` to tokio_timer. The `DelayQueue` allows
inserting elements as well as specifying a time at which the element
should be returned to the user. This allows handling more complex
timeout situations.
This commit is contained in:
Carl Lerche
2018-08-20 21:47:10 -07:00
committed by GitHub
parent c66b56c3fb
commit d822b721b4
14 changed files with 1803 additions and 518 deletions
+6
View File
@@ -14,6 +14,9 @@
//! a specified `Instant` in time. If the future does not complete in time,
//! then it is canceled and an error is returned.
//!
//! * [`DelayQueue`]: A queue where items are returned once the requested delay
//! has expired.
//!
//! These types are sufficient for handling a large number of scenarios
//! involving time.
//!
@@ -79,10 +82,13 @@
//! [Deadline]: struct.Deadline.html
//! [Delay]: struct.Delay.html
//! [Interval]: struct.Interval.html
//! [`DelayQueue`]: struct.DelayQueue.html
pub use tokio_timer::{
delay_queue,
Deadline,
DeadlineError,
DelayQueue,
Error,
Interval,
Delay,