Call task_check_scheduler_lock in queue_pop_try to avoid dead lock

This commit is contained in:
HASUMI Hitoshi
2026-05-18 15:30:44 +09:00
parent c9ae2524ee
commit a1a77e5acc
+3
View File
@@ -140,6 +140,9 @@ queue_pop_try(mrb_state *mrb, mrb_value self)
mrb_raise(mrb, E_RUNTIME_ERROR, "blocking pop can only be called from within a task");
}
/* Blocking pop requires the scheduler to be running */
task_check_scheduler_lock(mrb);
/* Guard against yielding from inside a C function boundary */
mrb_callinfo *ci;
for (ci = mrb->c->ci; ci >= mrb->c->cibase; ci--) {