From db31ace934e8b900e90853bd875f23195837b398 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Tue, 10 Nov 2020 18:21:11 +0900 Subject: Threads in a ractor will be killed with the ractor If a terminating ractor has child threads, then kill all child threads. --- ractor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ractor.c') diff --git a/ractor.c b/ractor.c index c30f5ce6c2..350e9c7b3f 100644 --- a/ractor.c +++ b/ractor.c @@ -1591,7 +1591,7 @@ rb_ractor_terminate_interrupt_main_thread(rb_ractor_t *r) } } -void rb_thread_terminate_all(void); // thread.c +void rb_thread_terminate_all(rb_thread_t *th); // thread.c static void ractor_terminal_interrupt_all(rb_vm_t *vm) @@ -1620,7 +1620,7 @@ rb_ractor_terminate_all(void) ractor_terminal_interrupt_all(vm); // kill all ractors RB_VM_UNLOCK(); } - rb_thread_terminate_all(); // kill other threads in main-ractor and wait + rb_thread_terminate_all(GET_THREAD()); // kill other threads in main-ractor and wait RB_VM_LOCK(); { -- cgit v1.2.3