diff --git a/futures-util/src/stream/futures_unordered/mod.rs b/futures-util/src/stream/futures_unordered/mod.rs index 913e260fd..7f7a00018 100644 --- a/futures-util/src/stream/futures_unordered/mod.rs +++ b/futures-util/src/stream/futures_unordered/mod.rs @@ -53,6 +53,14 @@ use self::ready_to_run_queue::{Dequeue, ReadyToRunQueue}; /// /// This type is only available when the `std` or `alloc` feature of this /// library is activated, and it is activated by default. +/// +/// # Cancel safety +/// +/// 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 { ready_to_run_queue: Arc>,