Project

General

Profile

« Previous | Next » 

Revision 1f030421

Added by jhawthorn (John Hawthorn) over 1 year ago

Use main_thread->ec from rb_vm_main_ractor_ec

rb_vm_main_ractor_ec was introduced to allow rb_postponed_job_* to work
when fired on non-Ruby threads, which have no EC set, and that is its
only use.

When RUBY_MN_THREADS=1 is set ractor->threads.running_ec is NULL when
the shared thread is sleeping. This instead grabs the EC directly from
the main thread which seems to always be set.

Fixes [Bug #20016]

Co-authored-by: Dustin Brown