thread_pthread.c (rb_sigwait_sleep): add note about spurious wakeup

I already forgot why we needed to jump through such hoops :x
[ruby-core:88102]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2018-11-09 23:24:14 +00:00
Родитель 4bf84ede20
Коммит 62c69768ba
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -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);