summary refs log tree commit diff
path: root/src/libstd/sys/unix/timer.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-31 10:20:31 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-31 10:20:31 -0800
commitaec67c2ee0f673ea7b0e21c2fe7e0f26a523d823 (patch)
tree032a8ec1398c7334c20b791a4c4c460feb5e2c79 /src/libstd/sys/unix/timer.rs
parent582cba183f18eea5c40b6c035d63ad449a9e8604 (diff)
downloadrust-aec67c2ee0f673ea7b0e21c2fe7e0f26a523d823.tar.gz
rust-aec67c2ee0f673ea7b0e21c2fe7e0f26a523d823.zip
Revert "std: Re-enable at_exit()"
This reverts commit 9e224c2bf18ebf8f871efb2e1aba43ed7970ebb7.

Conflicts:
	src/libstd/sys/windows/os.rs
Diffstat (limited to 'src/libstd/sys/unix/timer.rs')
-rw-r--r--src/libstd/sys/unix/timer.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/libstd/sys/unix/timer.rs b/src/libstd/sys/unix/timer.rs
index 150ec6aad8a..c0ef89666c0 100644
--- a/src/libstd/sys/unix/timer.rs
+++ b/src/libstd/sys/unix/timer.rs
@@ -100,7 +100,7 @@ pub fn now() -> u64 {
 fn helper(input: libc::c_int, messages: Receiver<Req>, _: ()) {
     let mut set: c::fd_set = unsafe { mem::zeroed() };
 
-    let fd = FileDesc::new(input, true);
+    let mut fd = FileDesc::new(input, true);
     let mut timeout: libc::timeval = unsafe { mem::zeroed() };
 
     // active timers are those which are able to be selected upon (and it's a
@@ -168,15 +168,8 @@ fn helper(input: libc::c_int, messages: Receiver<Req>, _: ()) {
             1 => {
                 loop {
                     match messages.try_recv() {
-                        // Once we've been disconnected it means the main thread
-                        // is exiting (at_exit has run). We could still have
-                        // active timers for other threads, so we're just going
-                        // to drop them all on the floor. This is all we can
-                        // really do, however, to prevent resource leakage. The
-                        // remaining timers will likely start panicking quickly
-                        // as they attempt to re-use this thread but are
-                        // disallowed to do so.
                         Err(comm::Disconnected) => {
+                            assert!(active.len() == 0);
                             break 'outer;
                         }