From a8e9b1a0d5960a201fb4f6b7c3c3d0fccd0aeb5f Mon Sep 17 00:00:00 2001 From: Marcin Mielniczuk Date: Wed, 11 Dec 2019 19:34:17 +0100 Subject: [PATCH] Comment on infinite sleep --- crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs index 4df00f4ea0..b45e10e086 100644 --- a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs +++ b/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();