Skip to content

Commit 193e140

Browse files
bors[bot]yjhn
andauthored
Merge #904
904: Improve docs of channel creation functions r=taiki-e a=yjhn Add note that the channel is multi-producer multi-consumer to the functions' docs. Also point to the parent module docs since they contain a lot of info on how to use the channel. These changes make functions' docs more self-contained (previously one needed to know to look at the module docs to discover this info). Co-authored-by: yjhn <[email protected]>
2 parents 7070018 + 05ed068 commit 193e140

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

crossbeam-channel/src/channel.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ use crate::flavors;
1616
use crate::select::{Operation, SelectHandle, Token};
1717
use crate::utils;
1818

19-
/// Creates a channel of unbounded capacity.
19+
/// Creates a multi-producer multi-consumer channel of unbounded capacity.
2020
///
2121
/// This channel has a growable buffer that can hold any number of messages at a time.
2222
///
23+
/// For more info on how to use the channel see [module level documentation](index.html).
24+
///
2325
/// # Examples
2426
///
2527
/// ```
@@ -54,13 +56,15 @@ pub fn unbounded<T>() -> (Sender<T>, Receiver<T>) {
5456
(s, r)
5557
}
5658

57-
/// Creates a channel of bounded capacity.
59+
/// Creates a multi-producer multi-consumer channel of bounded capacity.
5860
///
5961
/// This channel has a buffer that can hold at most `cap` messages at a time.
6062
///
6163
/// A special case is zero-capacity channel, which cannot hold any messages. Instead, send and
6264
/// receive operations must appear at the same time in order to pair up and pass the message over.
6365
///
66+
/// For more info on how to use the channel see [module level documentation](index.html).
67+
///
6468
/// # Examples
6569
///
6670
/// A channel of capacity 1:

0 commit comments

Comments
 (0)