Releases: socketry/io-event
Releases · socketry/io-event
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.
v1.15.1
v1.15.0
v1.14.5
v1.14.4
v1.7.1
What's Changed
- Include free list size in URing memsize by @casperisfine in #120
- Prefer
RB_OBJ_WRITEoverRB_OBJ_WRITTENby @casperisfine in #119 - Trigger write barriers when setting
IO_Event_Selector_EPoll_Descriptor.ioby @casperisfine in #118
Full Changelog: v1.7.0...v1.7.1