diff --git a/tokio/src/sync/oneshot.rs b/tokio/src/sync/oneshot.rs index c5857f654..32e288442 100644 --- a/tokio/src/sync/oneshot.rs +++ b/tokio/src/sync/oneshot.rs @@ -243,6 +243,13 @@ pub struct Sender { /// /// [`Future`]: trait@std::future::Future /// +/// # Cancellation safety +/// +/// The `Receiver` is cancel safe. If it is used as the event in a +/// [`tokio::select!`](crate::select) statement and some other branch +/// completes first, it is guaranteed that no message was received on this +/// channel. +/// /// # Examples /// /// ```