mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-26 00:00:16 +02:00
sync: clarify the cancellation safety of oneshot::Receiver (#7780)
Signed-off-by: ADD-SP <[email protected]> Co-authored-by: Alice Ryhl <[email protected]>
This commit is contained in:
@@ -243,6 +243,13 @@ pub struct Sender<T> {
|
||||
///
|
||||
/// [`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
|
||||
///
|
||||
/// ```
|
||||
|
||||
Reference in New Issue
Block a user