summaryrefslogtreecommitdiff
path: root/ractor.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2023-03-30 02:41:45 +0900
committerKoichi Sasada <ko1@atdot.net>2023-03-30 14:56:37 +0900
commitf5b824c745782d02b9420f8626f633e3de748d73 (patch)
tree3aab4671c2a92b8029e4e086d2fa1c1f4f6eb57c /ractor.c
parent30b43f4f1a37641edc0b146b8a648686a65a3aef (diff)
downloadruby-f5b824c745782d02b9420f8626f633e3de748d73.tar.gz
show debug log for `ractor_terminal_interrupt_all`
Diffstat (limited to 'ractor.c')
-rw-r--r--ractor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ractor.c b/ractor.c
index cd1a15eb2b..0dadd47cdd 100644
--- a/ractor.c
+++ b/ractor.c
@@ -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);
}
}
@@ -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