diff options
| author | bors <bors@rust-lang.org> | 2014-03-13 14:06:37 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-13 14:06:37 -0700 |
| commit | b4d324334cb48198c27d782002d75eba14a6abde (patch) | |
| tree | 950d8daa5e6305090bdd69625bb18ead48471865 /src/libstd/sync/mpsc_queue.rs | |
| parent | 6ff3c9995e63b63c16d13739a0fc2d321f95410e (diff) | |
| parent | 78580651131c9daacd7e5e4669af819cdd719f09 (diff) | |
| download | rust-b4d324334cb48198c27d782002d75eba14a6abde.tar.gz rust-b4d324334cb48198c27d782002d75eba14a6abde.zip | |
auto merge of #12815 : alexcrichton/rust/chan-rename, r=brson
* Chan<T> => Sender<T> * Port<T> => Receiver<T> * Chan::new() => channel() * constructor returns (Sender, Receiver) instead of (Receiver, Sender) * local variables named `port` renamed to `rx` * local variables named `chan` renamed to `tx` Closes #11765
Diffstat (limited to 'src/libstd/sync/mpsc_queue.rs')
| -rw-r--r-- | src/libstd/sync/mpsc_queue.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/sync/mpsc_queue.rs b/src/libstd/sync/mpsc_queue.rs index 2dc63380cb8..9d69f2b3b08 100644 --- a/src/libstd/sync/mpsc_queue.rs +++ b/src/libstd/sync/mpsc_queue.rs @@ -176,17 +176,17 @@ mod tests { Empty => {} Inconsistent | Data(..) => fail!() } - let (port, chan) = Chan::new(); + let (tx, rx) = channel(); let q = UnsafeArc::new(q); for _ in range(0, nthreads) { - let chan = chan.clone(); + let tx = tx.clone(); let q = q.clone(); native::task::spawn(proc() { for i in range(0, nmsgs) { unsafe { (*q.get()).push(i); } } - chan.send(()); + tx.send(()); }); } @@ -197,9 +197,9 @@ mod tests { Data(_) => { i += 1 } } } - drop(chan); + drop(tx); for _ in range(0, nthreads) { - port.recv(); + rx.recv(); } } } |
