Releases: socketry/io-event
Releases · socketry/io-event
Release list
v1.19.2
v1.19.1
- Fix
Process.waitall/Process.detachunder theURingselector: whenio_uring'swaitidreported an error (e.g.ECHILDwhen there are no more children), theprocess_waithook raised instead of returning the error as aProcess::Status, so callers that expectwaitpidto report "no more children" rather than raise would fail.
v1.19.0
- Use
io_uring_prep_waitidforprocess_waitin theURingselector (Linux 6.7+), waiting for child exit directly in the ring instead of polling on apidfd. The child is reaped viarb_process_status_wait(usingWEXITED | WNOWAIT) to construct a correctProcess::Status, andprocess_wait(-1, ...)/process_wait(0, ...)are now supported. - Support waiting for any child or a process group (
pid <= 0) on all selectors. TheEPoll(pidfd_open) andKQueue(EVFILT_PROC) selectors can only watch a specific process, so these cases now fall back to a blocking wait on a dedicated thread; joining it is fiber-scheduler aware, so the reactor keeps running.
v1.18.0
v1.17.0
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1.16.0
- Use
eventfdforURingcross-thread wakeup, and enableIORING_SETUP_SINGLE_ISSUER,IORING_SETUP_DEFER_TASKRUN, andIORING_SETUP_TASKRUN_FLAG. The waking thread now signals viaeventfdrather than submitting aNOPSQE, which unlocks the single-issuer optimisation, defers task work to the application thread, and letsselect()skip theio_uring_get_events()syscall when no task work is pending. - Add support for the
io_closefiber-scheduler hook (Ruby 4.0+). TheURingselector performs the close asynchronously via the ring; theDebug::SelectorandTestSchedulerwrappers forward to the underlying selector when supported. - Improve
WorkerPoolGC compaction support and add proper write barriers, fixing potential use-after-free under compacting GC. - Keep blocked scheduler fibers alive during GC by registering them as roots in
TestScheduler#block, preventing premature collection and the resulting use-after-free crash on resume. - Use Ruby's
xmalloc/xcalloc/xrealloc2/xfreefor all internal selector allocations (the per-fiber ready-queue entries inIO_Event_Selector_ready_push, and both the backing array and per-element allocations inIO_Event_Array). Previously a rawmallocpaired with a debug-build-onlyassert(...)would silently dereferenceNULLand crash in release builds under memory pressure; the Ruby allocators trigger a GC sweep on pressure and raiseNoMemoryError/RangeErroron real failure, so the-1return-code paths throughIO_Event_Array_initialize/_resize/_lookupand their callers inepoll.c/kqueue.c/uring.care removed in favour of straight exception propagation. - Correctly handle short
io_uring_submit()results in theURingselector.io_uring_submit()returns the number of SQEs actually accepted by the kernel and can be short (SQE prep errors,ENOMEM, transientEAGAIN); the old accounting resetpending = 0on any success and silently lost track of unsubmitted SQEs. - Enable
IORING_SETUP_SUBMIT_ALL(kernel 5.18+) on theURingselector so the kernel keeps processing the rest of an SQE batch past individual errors, reducing the frequency of short submits in practice.