summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hawthorn <[email protected]>2025-03-25 12:05:01 -0700
committerJohn Hawthorn <[email protected]>2025-03-25 19:14:26 -0700
commit8f952a117870d2a3284a33988aa23e7af3a3a2d3 ()
treee35ba627162e930ce922cecd02fdca74ac32700a
parentc576e83a241ef54b8da51e481676b286d905c120 (diff)
Clear VM_CHECK lock info on fork
We are resetting the actual lock so we should reset this information at the same time. Previously this caused an assertion to fail in debug mode.
Notes: Merged: https://.com/ruby/ruby/pull/12981
-rw-r--r--thread_pthread.c5
1 files changed, 5 insertions, 0 deletions
@@ -1549,6 +1549,11 @@ thread_sched_atfork(struct rb_thread_sched *sched)
vm->ractor.sched.running_cnt = 0;
rb_native_mutex_initialize(&vm->ractor.sched.lock);
// rb_native_cond_destroy(&vm->ractor.sched.cond);
rb_native_cond_initialize(&vm->ractor.sched.cond);
rb_native_cond_initialize(&vm->ractor.sched.barrier_complete_cond);