Clarify what tx/rx mean in concurrency docs
This commit is contained in:
parent
77f9231818
commit
9ec112749b
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user