Rollup merge of #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
This commit is contained in:
Manish Goregaokar 2016-02-14 03:59:10 +05:30
commit 8873732585

View File

@ -286,6 +286,8 @@ use std::sync::mpsc;
fn main() {
let data = Arc::new(Mutex::new(0));
// `tx` is the "transmitter" or "sender"
// `rx` is the "receiver"
let (tx, rx) = mpsc::channel();
for _ in 0..10 {