Browse Source

Comment on infinite sleep

pull/552/head
Marcin Mielniczuk 5 years ago
parent
commit
a8e9b1a0d5
No known key found for this signature in database GPG Key ID: 2CF0CE66660B8CC9
  1. 1
      crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs

1
crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs

@ -130,6 +130,7 @@ pub(crate) fn poll_oneoff(
return Ok(());
}
None => {
// `poll` invoked with nfds = 0, timeout = -1 appears to be an infinite sleep
// The thread is not guanteed to remain parked forever, so we need to loop
loop {
thread::park();

Loading…
Cancel
Save