@@ -91,7 +91,9 @@ pub struct Sender<T> {
91
91
///
92
92
/// Outstanding borrows hold a read lock on the inner value. This means that
93
93
/// long lived borrows could cause the produce half to block. It is recommended
94
- /// to keep the borrow as short lived as possible.
94
+ /// to keep the borrow as short lived as possible. Additionally, if you are
95
+ /// running in an environment that allows `!Send` futures, you must ensure that
96
+ /// the returned `Ref` type is never held alive across an `.await` point.
95
97
///
96
98
/// The priority policy of the lock is dependent on the underlying lock
97
99
/// implementation, and this type does not guarantee that any particular policy
@@ -301,7 +303,9 @@ impl<T> Receiver<T> {
301
303
///
302
304
/// Outstanding borrows hold a read lock. This means that long lived borrows
303
305
/// could cause the send half to block. It is recommended to keep the borrow
304
- /// as short lived as possible.
306
+ /// as short lived as possible. Additionally, if you are running in an
307
+ /// environment that allows `!Send` futures, you must ensure that the
308
+ /// returned `Ref` type is never held alive across an `.await` point.
305
309
///
306
310
/// The priority policy of the lock is dependent on the underlying lock
307
311
/// implementation, and this type does not guarantee that any particular policy
@@ -344,7 +348,9 @@ impl<T> Receiver<T> {
344
348
///
345
349
/// Outstanding borrows hold a read lock. This means that long lived borrows
346
350
/// could cause the send half to block. It is recommended to keep the borrow
347
- /// as short lived as possible.
351
+ /// as short lived as possible. Additionally, if you are running in an
352
+ /// environment that allows `!Send` futures, you must ensure that the
353
+ /// returned `Ref` type is never held alive across an `.await` point.
348
354
///
349
355
/// The priority policy of the lock is dependent on the underlying lock
350
356
/// implementation, and this type does not guarantee that any particular policy
0 commit comments