mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Add support for Queue & SizedQueue.
This commit is contained in:
parent
0f613cc5f1
commit
8eea66a0ca
Notes:
git
2020-09-14 13:44:35 +09:00
3 changed files with 77 additions and 33 deletions
9
thread.c
9
thread.c
|
@ -1481,8 +1481,13 @@ rb_thread_sleep_interruptible(void)
|
|||
static void
|
||||
rb_thread_sleep_deadly_allow_spurious_wakeup(void)
|
||||
{
|
||||
thread_debug("rb_thread_sleep_deadly_allow_spurious_wakeup\n");
|
||||
sleep_forever(GET_THREAD(), SLEEP_DEADLOCKABLE);
|
||||
VALUE scheduler = rb_thread_current_scheduler();
|
||||
if (scheduler != Qnil) {
|
||||
rb_scheduler_kernel_sleepv(scheduler, 0, NULL);
|
||||
} else {
|
||||
thread_debug("rb_thread_sleep_deadly_allow_spurious_wakeup\n");
|
||||
sleep_forever(GET_THREAD(), SLEEP_DEADLOCKABLE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue