Skip to content

Commit db16a35

Browse files
committed
Rollup merge of rust-lang#31610 - Manishearth:doc-clarify-txrx, r=steveklabnik
Not everyone knows this convention. We could just rename the variables in the example, but since this notation is commonly used it's a good opportunity to introduce it. r? @steveklabnik
2 parents 6a625f8 + 9ec1127 commit db16a35

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/doc/book/concurrency.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ use std::sync::mpsc;
286286
fn main() {
287287
let data = Arc::new(Mutex::new(0));
288288

289+
// `tx` is the "transmitter" or "sender"
290+
// `rx` is the "receiver"
289291
let (tx, rx) = mpsc::channel();
290292

291293
for _ in 0..10 {

0 commit comments

Comments
 (0)