diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-02 09:24:56 -0800 | 
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-02 10:50:13 -0800 | 
| commit | e921e3f04513ffb094208a538a2835d4dc77b991 (patch) | |
| tree | 0fc18976815572ac2f9cab2e01236243e684eb4d /src/libstd/sys/windows/timer.rs | |
| parent | 1f2ead1629ce544d98f35225061d216abd86d5a6 (diff) | |
| download | rust-e921e3f04513ffb094208a538a2835d4dc77b991.tar.gz rust-e921e3f04513ffb094208a538a2835d4dc77b991.zip  | |
Rollup test fixes and rebase conflicts
Diffstat (limited to 'src/libstd/sys/windows/timer.rs')
| -rw-r--r-- | src/libstd/sys/windows/timer.rs | 9 | 
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libstd/sys/windows/timer.rs b/src/libstd/sys/windows/timer.rs index 485dc251050..343b78543bf 100644 --- a/src/libstd/sys/windows/timer.rs +++ b/src/libstd/sys/windows/timer.rs @@ -25,10 +25,9 @@ use prelude::v1::*; use libc; use ptr; -use comm; -use comm::{channel, Sender, Receiver}; use io::IoResult; +use sync::mpsc::{channel, Sender, Receiver, TryRecvError}; use sys::c; use sys::fs::FileDesc; use sys_common::helper_thread::Helper; @@ -72,7 +71,7 @@ fn helper(input: libc::HANDLE, messages: Receiver<Req>, _: ()) { chans.push((c, one)); } Ok(RemoveTimer(obj, c)) => { - c.send(()); + c.send(()).unwrap(); match objs.iter().position(|&o| o == obj) { Some(i) => { drop(objs.remove(i)); @@ -81,7 +80,7 @@ fn helper(input: libc::HANDLE, messages: Receiver<Req>, _: ()) { None => {} } } - Err(comm::Disconnected) => { + Err(TryRecvError::Disconnected) => { assert_eq!(objs.len(), 1); assert_eq!(chans.len(), 0); break 'outer; @@ -133,7 +132,7 @@ impl Timer { let (tx, rx) = channel(); HELPER.send(RemoveTimer(self.obj, tx)); - rx.recv(); + rx.recv().unwrap(); self.on_worker = false; }  | 
