Skip to content

Commit 102d4a3

Browse files
committed
Speaker notes for unbounded channels
1 parent a2b2250 commit 102d4a3

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/concurrency/channels/unbounded.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/smart-pointers/rc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)