You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FIX: harden single-threaded fork, dispose, and interrupt handling
Recover inherited idle single-threaded runners after fork by
reinitializing child-side condition variables and lazily starting a fresh
runner thread in the child.
Avoid single-threaded finalizer corruption by removing detached native
cleanup threads and finalizing synchronously. If a forked child inherits a
non-idle context, abandon the unsafe inherited native state instead of
trying to tear it down.
Make busy JavaScript execution interruptible from Ruby thread shutdown,
Thread#kill/raise, and cross-thread Context#dispose by wiring an unblock
function that terminates V8 execution. Make callback roundtrips
dispose-aware so disposing while a Ruby callback is active does not hang
or crash.
Also make reentrant dispose from callbacks raise instead of deadlocking,
add regression coverage for these fork/dispose/interruption cases, bump
the gem version to 0.21.3, and fix a flaky datetime millisecond assertion
that used floating point time conversion.
Copy file name to clipboardExpand all lines: CHANGELOG
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,10 @@
1
+
- 0.21.3 - 18-06-2026
2
+
- Fix `:single_threaded` contexts inherited across `fork` by recovering idle reusable native runners in the child process without falling back to per-dispatch native thread spawning
3
+
- Avoid intermittent heap corruption during `:single_threaded` context finalization, especially when forked children exit normally after touching inherited contexts
4
+
- Avoid finalizer hangs when a forked child garbage-collects a non-idle inherited `:single_threaded` context
5
+
- Allow Ruby thread interrupts, process shutdown, and cross-thread `Context#dispose` to terminate busy `:single_threaded` JavaScript execution instead of hanging
6
+
- Make `Context#dispose` while an attached Ruby callback is active either terminate safely or raise instead of deadlocking
7
+
1
8
- 0.21.2 - 11-06-2026
2
9
- Add `Context#perform_microtask_checkpoint` to synchronously drain the V8 microtask queue, useful for spec-compliant `dispatchEvent` sequencing inside Ruby callbacks
3
10
- Fix native memory leaks in `Context#heap_snapshot`/`Context#write_heap_snapshot`; thanks to Pranjali Thakur from depthfirst.com
0 commit comments