Clarify what tx/rx mean in concurrency docs
This commit is contained in:
parent
77f9231818
commit
9ec112749b
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue