Commit d0e2242
Reset runtime and preempted in rb_fiber_atfork
The child process inherits the parent's root fiber state at fork time.
rb_fiber_atfork already reset quantum to the default but left runtime
and preempted untouched. A child forked while a fiber had accumulated
runtime or had preempted=1 would start with stale scheduling state,
potentially triggering an immediate spurious preemption on the first
back-edge check. Reset all three fields consistently, matching what
rb_threadptr_root_fiber_setup does for a freshly created root fiber.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 2f97734 commit d0e2242
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3591 | 3591 | | |
3592 | 3592 | | |
3593 | 3593 | | |
3594 | | - | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
3595 | 3597 | | |
3596 | 3598 | | |
3597 | 3599 | | |
| |||
0 commit comments