diff options
| author | John Hawthorn <john@hawthorn.email> | 2025-08-15 10:11:45 -0700 |
|---|---|---|
| committer | John Hawthorn <john@hawthorn.email> | 2025-08-15 12:43:33 -0700 |
| commit | 149add89e38197c4ffc8cb4e8b96839909b29dd6 (patch) | |
| tree | ae7588922f325fbde404133a331df1b40380bab2 /test | |
| parent | 88906e13e6ed9e5fdd94886ef8ab15d21d26743d (diff) | |
Don't free Ractors in GC shutdown
rb_gc_shutdown_call_finalizer_p returns false for threads and fibers, so
it should probably do the same for all Ractors (not just the main one).
This hopefully mitigates a bug where, at exit, rb_ractor_terminate_all
gets all Ractors to stop before continuing with the shutdown process.
However when vm->ractor.cnt reaches 1, the native threads may still be
running code at the end co_start, which reads/locks on
th->ractor->threads.sched, so the Ractor is not safe to free.
A better solution might be to ensure that all native threads end up
stopped or otherwise parked before this part of the shutdown, however
that would be a bit more involved.
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions
