File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -30,4 +30,17 @@ fn main() {
3030}
3131```
3232
33+ <details >
34+
35+ - The channel is called asynchronous because there is no synchronization between
36+ sending and receiving.
37+ - The channel buffers the values. The buffer grows automatically, similar to how
38+ a ` Vec ` grows when you push data to it.
39+ - The channel takes ownership of the values when you call [ ` send() ` ] . This is
40+ seen in the signature: it takes ` T ` by value. You thus lose access to the
41+ value you send into a channel.
42+
43+ </details >
44+
3345[ `mpsc::channel()` ] : https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html
46+ [ `send()` ] : https://doc.rust-lang.org/std/sync/mpsc/struct.Sender.html#method.send
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ fn main() {
2424 cycles that will get dropped.
2525
2626[ 1 ] : https://doc.rust-lang.org/std/rc/struct.Rc.html
27- [ 2 ] : ../concurrency/shared_state /arc.md
27+ [ 2 ] : ../concurrency/shared-state /arc.md
2828[ 3 ] : https://doc.rust-lang.org/std/sync/struct.Mutex.html
2929[ 4 ] : https://doc.rust-lang.org/std/rc/struct.Weak.html
3030
You can’t perform that action at this time.
0 commit comments