Even better idle waiting method

This commit is contained in:
LemonBoy 2020-03-13 19:20:18 +01:00
parent e496ef26da
commit 2501e80500

View File

@ -278,11 +278,11 @@ pub fn panicExtra(trace: ?*const builtin.StackTrace, first_trace_addr: ?usize, c
// Another thread is panicking, wait for the last one to finish
// and call abort()
// Here we sleep forever without hammering the CPU by causing a
// deadlock
var deadlock = std.Mutex.init();
_ = deadlock.acquire();
_ = deadlock.acquire();
// Sleep forever without hammering the CPU
var event = std.ResetEvent.init();
event.wait();
unreachable;
}
},
1 => {