Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions tokio-util/src/time/delay_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use std::task::{self, ready, Poll, Waker};
/// # `Stream` implementation
///
/// Items are retrieved from the queue via [`DelayQueue::poll_expired`]. If no delays have
/// expired, no items are returned. In this case, `Poll::Pending` is returned and the
/// expired, no items are returned. In this case, [`Poll::Pending`] is returned and the
/// current task is registered to be notified once the next item's delay has
/// expired.
///
Expand All @@ -66,9 +66,13 @@ use std::task::{self, ready, Poll, Waker};
/// Capacity can be checked using [`capacity`] and allocated preemptively by using
/// the [`reserve`] method.
///
/// # Cancellation safety
///
/// [`DelayQueue`]'s implementation of [`StreamExt::next`] is cancellation safe.
///
/// # Usage
///
/// Using `DelayQueue` to manage cache entries.
/// Using [`DelayQueue`] to manage cache entries.
///
/// ```rust,no_run
/// use tokio_util::time::{DelayQueue, delay_queue};
Expand Down Expand Up @@ -118,7 +122,8 @@ use std::task::{self, ready, Poll, Waker};
/// [`insert`]: method@Self::insert
/// [`insert_at`]: method@Self::insert_at
/// [`Key`]: struct@Key
/// [`Stream`]: https://docs.rs/futures/0.1/futures/stream/trait.Stream.html
/// [`Stream`]: https://docs.rs/futures/0.3.31/futures/stream/trait.Stream.html
/// [`StreamExt::next`]: https://docs.rs/tokio-stream/0.1.17/tokio_stream/trait.StreamExt.html#method.next
/// [`poll_expired`]: method@Self::poll_expired
/// [`Stream::poll_expired`]: method@Self::poll_expired
/// [`DelayQueue`]: struct@DelayQueue
Expand Down
Loading