Revert "std: Re-enable at_exit()"
This reverts commit 9e224c2bf1
.
Conflicts:
src/libstd/sys/windows/os.rs
This commit is contained in:
parent
582cba183f
commit
aec67c2ee0
39 changed files with 245 additions and 191 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue