diff options
-rw-r--r-- | thread_pthread.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index aa5fe66adc..1f2ac00b67 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -1981,6 +1981,9 @@ rb_sigwait_sleep(rb_thread_t *th, int sigwait_fd, const rb_hrtime_t *rel) * tricky: this needs to return on spurious wakeup (no auto-retry). * But we also need to distinguish between periodic quantum * wakeups, so we care about the result of consume_communication_pipe + * + * We want to avoid spurious wakeup for Mutex#sleep compatibility + * [ruby-core:88102] */ for (;;) { const rb_hrtime_t *sto = sigwait_timeout(th, sigwait_fd, &to, &n); |