diff --git a/tokio/src/sync/watch.rs b/tokio/src/sync/watch.rs index 184ba4b6041..7de4ebc0351 100644 --- a/tokio/src/sync/watch.rs +++ b/tokio/src/sync/watch.rs @@ -91,7 +91,9 @@ pub struct Sender { /// /// Outstanding borrows hold a read lock on the inner value. This means that /// long lived borrows could cause the produce half to block. It is recommended -/// to keep the borrow as short lived as possible. +/// to keep the borrow as short lived as possible. Additionally, if you are +/// running in an environment that allows `!Send` futures, you must ensure that +/// the returned `Ref` type is never held alive across an `.await` point. /// /// The priority policy of the lock is dependent on the underlying lock /// implementation, and this type does not guarantee that any particular policy @@ -301,7 +303,9 @@ impl Receiver { /// /// Outstanding borrows hold a read lock. This means that long lived borrows /// could cause the send half to block. It is recommended to keep the borrow - /// as short lived as possible. + /// as short lived as possible. Additionally, if you are running in an + /// environment that allows `!Send` futures, you must ensure that the + /// returned `Ref` type is never held alive across an `.await` point. /// /// The priority policy of the lock is dependent on the underlying lock /// implementation, and this type does not guarantee that any particular policy @@ -344,7 +348,9 @@ impl Receiver { /// /// Outstanding borrows hold a read lock. This means that long lived borrows /// could cause the send half to block. It is recommended to keep the borrow - /// as short lived as possible. + /// as short lived as possible. Additionally, if you are running in an + /// environment that allows `!Send` futures, you must ensure that the + /// returned `Ref` type is never held alive across an `.await` point. /// /// The priority policy of the lock is dependent on the underlying lock /// implementation, and this type does not guarantee that any particular policy