diff options
| author | bors <bors@rust-lang.org> | 2015-03-20 20:19:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-20 20:19:42 +0000 |
| commit | 68d69415637186755482d2584e6ba82b67bc1d89 (patch) | |
| tree | 702068026393f26edf8b134f8dca0219dd1c0255 /src/libstd/sys/unix | |
| parent | 3900c089a1305f06c6dbb15d07127b4e3a8f040c (diff) | |
| parent | 1cc9718fdef63476ffdf3f0bcd74b554b083f378 (diff) | |
| download | rust-68d69415637186755482d2584e6ba82b67bc1d89.tar.gz rust-68d69415637186755482d2584e6ba82b67bc1d89.zip | |
Auto merge of #23267 - alexcrichton:issue-20012, r=aturon
This reverts commit aec67c2. Closes #20012 This is temporarily rebased on #23245 as it would otherwise conflict, the last commit is the only one relevant to this PR though.
Diffstat (limited to 'src/libstd/sys/unix')
| -rw-r--r-- | src/libstd/sys/unix/timer.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstd/sys/unix/timer.rs b/src/libstd/sys/unix/timer.rs index ef0274fdda9..ef175d68fc4 100644 --- a/src/libstd/sys/unix/timer.rs +++ b/src/libstd/sys/unix/timer.rs @@ -170,8 +170,15 @@ 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(TryRecvError::Disconnected) => { - assert!(active.len() == 0); break 'outer; } |
