Comment on infinite sleep

This commit is contained in:
Marcin Mielniczuk
2019-12-11 19:34:17 +01:00
parent 7cb8137fae
commit a8e9b1a0d5

View File

@@ -130,6 +130,7 @@ pub(crate) fn poll_oneoff(
return Ok(()); return Ok(());
} }
None => { 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 // The thread is not guanteed to remain parked forever, so we need to loop
loop { loop {
thread::park(); thread::park();