Skip to content

Commit

Permalink
Fibers should update themselves on compaction
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tenderlove committed Sep 25, 2020
1 parent 8b42474 commit 137fa5b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions vm.c
Expand Up @@ -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
Expand Down

0 comments on commit 137fa5b

Please sign in to comment.