@@ -22,7 +22,7 @@ use crate::sync::WakerSet;
22
22
///
23
23
/// Senders and receivers can be cloned. When all senders associated with a channel get dropped, it
24
24
/// becomes closed. Receive operations on a closed and empty channel return `None` instead of
25
- /// blocking .
25
+ /// trying to await a message .
26
26
///
27
27
/// # Panics
28
28
///
@@ -44,7 +44,7 @@ use crate::sync::WakerSet;
44
44
/// s.send(1).await;
45
45
///
46
46
/// task::spawn(async move {
47
- /// // This call blocks the current task because the channel is full.
47
+ /// // This call will have to wait because the channel is full.
48
48
/// // It will be able to complete only after the first message is received.
49
49
/// s.send(2).await;
50
50
/// });
@@ -102,8 +102,7 @@ pub struct Sender<T> {
102
102
impl < T > Sender < T > {
103
103
/// Sends a message into the channel.
104
104
///
105
- /// If the channel is full, this method will block the current task until the send operation
106
- /// can proceed.
105
+ /// If the channel is full, this method will wait until there is space in the channel.
107
106
///
108
107
/// # Examples
109
108
///
@@ -346,9 +345,8 @@ pub struct Receiver<T> {
346
345
impl < T > Receiver < T > {
347
346
/// Receives a message from the channel.
348
347
///
349
- /// If the channel is empty and it still has senders, this method will block the current task
350
- /// until the receive operation can proceed. If the channel is empty and there are no more
351
- /// senders, this method returns `None`.
348
+ /// If the channel is empty and still has senders, this method will wait until a message is
349
+ /// sent into the channel or until all senders get dropped.
352
350
///
353
351
/// # Examples
354
352
///
0 commit comments