From 137fa5b27e6db535fcf42e4390b42ca8adc9dacd Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 25 Sep 2020 09:18:12 -0700 Subject: Fibers should update themselves on compaction We should let fibers update their own references on compaction. I don't think we need the thread to update the associated fiber because there will be a fiber object on the heap that knows how to update itself. --- vm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'vm.c') diff --git a/vm.c b/vm.c index 15b305e8b9..076bbbe3d8 100644 --- a/vm.c +++ b/vm.c @@ -2658,11 +2658,10 @@ static void thread_compact(void *ptr) { rb_thread_t *th = ptr; - rb_fiber_update_self(th->ec->fiber_ptr); - if (th->root_fiber) rb_fiber_update_self(th->root_fiber); - - rb_execution_context_update(th->ec); + if (!th->root_fiber) { + rb_execution_context_update(th->ec); + } } static void -- cgit v1.2.3