From 78580651131c9daacd7e5e4669af819cdd719f09 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sun, 9 Mar 2014 14:58:32 -0700 Subject: std: Rename Chan/Port types and constructor * Chan => Sender * Port => Receiver * 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 --- src/libstd/sync/spsc_queue.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd/sync/spsc_queue.rs') diff --git a/src/libstd/sync/spsc_queue.rs b/src/libstd/sync/spsc_queue.rs index a2c61a2b135..9277587e587 100644 --- a/src/libstd/sync/spsc_queue.rs +++ b/src/libstd/sync/spsc_queue.rs @@ -273,7 +273,7 @@ mod test { fn stress_bound(bound: uint) { let (a, b) = UnsafeArc::new2(Queue::new(bound)); - let (port, chan) = Chan::new(); + let (tx, rx) = channel(); native::task::spawn(proc() { for _ in range(0, 100000) { loop { @@ -284,12 +284,12 @@ mod test { } } } - chan.send(()); + tx.send(()); }); for _ in range(0, 100000) { unsafe { (*a.get()).push(1); } } - port.recv(); + rx.recv(); } } } -- cgit 1.4.1-3-g733a5