Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Conditionalize cancel-safety on Future cancel safety
  • Loading branch information
akonradi-signal committed Dec 2, 2024
commit ea5b0ea5414e591de23bfef32c2b8c5e640892da
9 changes: 5 additions & 4 deletions futures-util/src/stream/futures_unordered/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ use self::ready_to_run_queue::{Dequeue, ReadyToRunQueue};
///
/// # Cancel safety
///
/// This type is cancellation-safe. If [`poll_next`](Stream::poll_next) is
/// called (either directly or via [`crate::StreamExt::next`]) and it returns
/// [`Poll::Pending`], no values will be dropped if `poll_next` is not called
/// again.
/// This type is cancellation-safe when the inner [`Future`] is
/// cancellation-safe. If the future type is cancellation-safe, and
/// [`poll_next`](Stream::poll_next) is called (either directly or via
/// [`crate::StreamExt::next`]) and returns [`Poll::Pending`], no values will be
/// dropped if `poll_next` is not called again.
#[must_use = "streams do nothing unless polled"]
pub struct FuturesUnordered<Fut> {
ready_to_run_queue: Arc<ReadyToRunQueue<Fut>>,
Expand Down
Loading