diff options
| author | Samuel Williams <samuel.williams@shopify.com> | 2025-12-01 17:19:42 +1300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-01 17:19:42 +1300 |
| commit | 8eea9a502031e866f210accc7d02347fc55f65c9 (patch) | |
| tree | 3d919ea782a16c888a9ccfca62dca3d537d12150 /thread.c | |
| parent | 4c56001d27c4b2431fee65e6e9426319c475c45d (diff) | |
Nullify scheduler during `terminate_atfork_i`. (#15354)
Diffstat (limited to 'thread.c')
| -rw-r--r-- | thread.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -4979,6 +4979,9 @@ static void terminate_atfork_i(rb_thread_t *th, const rb_thread_t *current_th) { if (th != current_th) { + // Clear the scheduler as it is no longer operational: + th->scheduler = Qnil; + rb_native_mutex_initialize(&th->interrupt_lock); rb_mutex_abandon_keeping_mutexes(th); rb_mutex_abandon_locking_mutex(th); |
