Skip to content

Commit

Permalink
show debug log for ractor_terminal_interrupt_all
Browse files Browse the repository at this point in the history
  • Loading branch information
ko1 committed Mar 30, 2023
1 parent 30b43f4 commit f5b824c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ractor.c
Original file line number Diff line number Diff line change
Expand Up @@ -2322,6 +2322,7 @@ ractor_terminal_interrupt_all(rb_vm_t *vm)
rb_ractor_t *r = 0;
ccan_list_for_each(&vm->ractor.set, r, vmlr_node) {
if (r != vm->ractor.main_ractor) {
RUBY_DEBUG_LOG("r:%d", rb_ractor_id(r));
rb_ractor_terminate_interrupt_main_thread(r);
}
}
Expand All @@ -2338,7 +2339,9 @@ rb_ractor_terminate_all(void)

if (vm->ractor.cnt > 1) {
RB_VM_LOCK();
ractor_terminal_interrupt_all(vm); // kill all ractors
{
ractor_terminal_interrupt_all(vm); // kill all ractors
}
RB_VM_UNLOCK();
}
rb_thread_terminate_all(GET_THREAD()); // kill other threads in main-ractor and wait
Expand Down

0 comments on commit f5b824c

Please sign in to comment.