Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit e368c17

Browse files
committed
Merge 'poll-busy-wait' into HEAD
2 parents a3686bb + 58f4e51 commit e368c17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compat/poll/poll.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,9 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout)
605605

606606
if (!rc && timeout == INFTIM)
607607
{
608-
SwitchToThread();
608+
/* Sleep 1 millisecond to avoid busy wait */
609+
SleepEx(1, TRUE);
610+
609611
goto restart;
610612
}
611613

0 commit comments

Comments
 (0)