mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-03 09:32:42 +00:00
warn of possible race condition in channel is_disconnected doc
This commit is contained in:
parent
7adb9bac0c
commit
feef7b4eaf
@@ -626,6 +626,10 @@ impl<T> Sender<T> {
|
||||
|
||||
/// Returns `true` if the channel is disconnected.
|
||||
///
|
||||
/// Note that a return value of `false` does not guarantee the channel will
|
||||
/// remain connected. The channel may be disconnected immediately after this method
|
||||
/// returns, so a subsequent [`Sender::send`] may still fail with [`SendError`].
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@@ -1375,6 +1379,10 @@ impl<T> Receiver<T> {
|
||||
|
||||
/// Returns `true` if the channel is disconnected.
|
||||
///
|
||||
/// Note that a return value of `false` does not guarantee the channel will
|
||||
/// remain connected. The channel may be disconnected immediately after this method
|
||||
/// returns, so a subsequent [`Receiver::recv`] may still fail with [`RecvError`].
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
||||
@@ -610,6 +610,10 @@ impl<T> Sender<T> {
|
||||
|
||||
/// Returns `true` if the channel is disconnected.
|
||||
///
|
||||
/// Note that a return value of `false` does not guarantee the channel will
|
||||
/// remain connected. The channel may be disconnected immediately after this method
|
||||
/// returns, so a subsequent [`Sender::send`] may still fail with [`SendError`].
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@@ -1060,6 +1064,10 @@ impl<T> Receiver<T> {
|
||||
|
||||
/// Returns `true` if the channel is disconnected.
|
||||
///
|
||||
/// Note that a return value of `false` does not guarantee the channel will
|
||||
/// remain connected. The channel may be disconnected immediately after this method
|
||||
/// returns, so a subsequent [`Receiver::recv`] may still fail with [`RecvError`].
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
||||
Reference in New Issue
Block a user