Skip to content

Releases: socketry/io-event

v1.19.2

Choose a tag to compare

@ioquatix ioquatix released this 12 Jul 23:53
65967a1
  • Use rb_process_status_for when available to construct URing process_wait results directly from waitid, avoiding the extra reap syscall previously needed to build a Process::Status.

v1.19.1

Choose a tag to compare

@ioquatix ioquatix released this 30 Jun 14:01
e246f86
  • Fix Process.waitall / Process.detach under the URing selector: when io_uring's waitid reported an error (e.g. ECHILD when there are no more children), the process_wait hook raised instead of returning the error as a Process::Status, so callers that expect waitpid to report "no more children" rather than raise would fail.

v1.19.0

Choose a tag to compare

@ioquatix ioquatix released this 30 Jun 11:10
3f519d1
  • Use io_uring_prep_waitid for process_wait in the URing selector (Linux 6.7+), waiting for child exit directly in the ring instead of polling on a pidfd. The child is reaped via rb_process_status_wait (using WEXITED | WNOWAIT) to construct a correct Process::Status, and process_wait(-1, ...) / process_wait(0, ...) are now supported.
  • Support waiting for any child or a process group (pid <= 0) on all selectors. The EPoll (pidfd_open) and KQueue (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

Choose a tag to compare

@ioquatix ioquatix released this 30 Jun 07:59
fecf88c
  • Fixed: Avoid entering a blocking native selector wait when an interrupt is already pending for the current thread.

v1.17.0

Choose a tag to compare

@ioquatix ioquatix released this 28 Jun 15:27
34e60dd
  • Report inherited selector objects as closed after fork, and avoid closing descriptors they no longer own.

v1.16.4

Choose a tag to compare

@ioquatix ioquatix released this 24 Jun 01:58
20990cc
  • Correctly implement Interrupt#signal so that it is robust enough to be called by Scheduler#unblock.

v1.16.3

Choose a tag to compare

@ioquatix ioquatix released this 23 Jun 09:48
7808115
  • Handle IOError raised while shutting down the pure Ruby interrupt pipe, so IO::Event::Interrupt#close does not leak expected shutdown errors from the interrupt fiber.

v1.16.2

Choose a tag to compare

@ioquatix ioquatix released this 13 Jun 04:24
a360692
  • Improve timer heap performance by batching scheduled timer insertion, compacting cancelled timers during flush, and avoiding unnecessary heap rebuilds for small incremental inserts.

v1.16.1

Choose a tag to compare

@ioquatix ioquatix released this 25 May 16:22
4c84e3a
  • Ensure the pure Ruby Select selector returns false, not nil, when io_wait resumes without any ready events.

v1.16.0

Choose a tag to compare

@ioquatix ioquatix released this 12 May 06:28
d59a55a
  • Use eventfd for URing cross-thread wakeup, and enable IORING_SETUP_SINGLE_ISSUER, IORING_SETUP_DEFER_TASKRUN, and IORING_SETUP_TASKRUN_FLAG. The waking thread now signals via eventfd rather than submitting a NOP SQE, which unlocks the single-issuer optimisation, defers task work to the application thread, and lets select() skip the io_uring_get_events() syscall when no task work is pending.
  • Add support for the io_close fiber-scheduler hook (Ruby 4.0+). The URing selector performs the close asynchronously via the ring; the Debug::Selector and TestScheduler wrappers forward to the underlying selector when supported.
  • Improve WorkerPool GC 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 / xfree for all internal selector allocations (the per-fiber ready-queue entries in IO_Event_Selector_ready_push, and both the backing array and per-element allocations in IO_Event_Array). Previously a raw malloc paired with a debug-build-only assert(...) would silently dereference NULL and crash in release builds under memory pressure; the Ruby allocators trigger a GC sweep on pressure and raise NoMemoryError / RangeError on real failure, so the -1 return-code paths through IO_Event_Array_initialize / _resize / _lookup and their callers in epoll.c / kqueue.c / uring.c are removed in favour of straight exception propagation.
  • Correctly handle short io_uring_submit() results in the URing selector. io_uring_submit() returns the number of SQEs actually accepted by the kernel and can be short (SQE prep errors, ENOMEM, transient EAGAIN); the old accounting reset pending = 0 on any success and silently lost track of unsubmitted SQEs.
  • Enable IORING_SETUP_SUBMIT_ALL (kernel 5.18+) on the URing selector so the kernel keeps processing the rest of an SQE batch past individual errors, reducing the frequency of short submits in practice.