diff --git a/tokio/src/sync/watch.rs b/tokio/src/sync/watch.rs index 3d52e4b0a..96d1d1642 100644 --- a/tokio/src/sync/watch.rs +++ b/tokio/src/sync/watch.rs @@ -422,6 +422,9 @@ impl Drop for Receiver { impl Sender { /// Sends a new value via the channel, notifying all receivers. + /// + /// This method fails if the channel has been closed, which happens when + /// every receiver has been dropped. pub fn send(&self, value: T) -> Result<(), error::SendError> { // This is pretty much only useful as a hint anyway, so synchronization isn't critical. if 0 == self.shared.ref_count_rx.load(Relaxed) {