diff options
author | Aaron Patterson <[email protected]> | 2020-09-25 09:18:12 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2020-09-25 15:52:04 -0700 |
commit | 137fa5b27e6db535fcf42e4390b42ca8adc9dacd (patch) | |
tree | de29f256ea35f7a57887045a34b69e09e432f10c /vm.c | |
parent | 8b42474a2604f35f6d2a635562ef16efc1af456c (diff) |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3588
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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 |