Up to [cvs.NetBSD.org] / pkgsrc / devel / ruby-io-event
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
devel/ruby-io-event: update to 1.22.3 1.22.2 (not released) 1.22.3 (2026-10-18) * Sign releases with the shared Socketry certificate. #237
devel/ruby-io-event: update to 1.22.1 1.22.1 (2026-09-23) * Fix an infinite loop in the ready queue flush when a queued fiber is resumed out of band, e.g. by a stale unblock racing a timeout, while another fiber re-queues itself on every iteration. * Preserve each ready queue flush's boundary with its own placeholder so newly queued fibers are deferred even when earlier entries are removed. Nested native flushes skip other placeholders, processing work queued before their own boundary. Native selectors ignore placeholders when checking readiness and remove them if a fiber raises.
devel/ruby-io-event: update to 1.22.0 1.22.0 (2026-09-10) * Reject non-finite timer times (NaN and positive or negative infinity), preventing invalid heap ordering and permanently retained timer handles.
devel/ruby-io-event: update to 1.21.1 1.20.0 (2026-08-26) Add compatibility with Ruby 4.1's fiber scheduler interface version 4. Buffered IO operations now use (offset, length), perform a single transfer of at most length bytes, return short transfers directly, and report -EAGAIN without waiting. Earlier Ruby versions retain the existing minimum-progress behavior. 1.20.1 (2026-08-26) * Fix io_uring scheduler v4 compilation. (#214) 1.21.0 (2026-08-26) * Handle interrupted io_uring process waits. (#215) 1.21.1 (2026-08-27) * Fix the URing completion free-list empty check so its sole entry can be reused instead of unnecessarily allocating a new completion. * Keep cancelled URing completion records allocated until both the operation and cancellation completions have been processed.
devel/ruby-io-event: update to 1.19.5 1.19.5 (2026-08-14) * Preserve the original exception or non-local control flow when IO::Event::WorkerPool cancellation interrupts a blocked fiber, while still cancelling and draining the in-flight blocking operation before returning control to Ruby.
devel/ruby-io-event: update to 1.19.4 1.19.4 (2026-07-27) * Capture errno immediately after epoll_wait / kevent, preventing stale or subsequently clobbered values from raising a spurious Errno::* when a native selector wait is interrupted or skipped.
devel/ruby-io-event: update to 1.19.3 1.19.3 (2026-07-21) * Prevent URing, EPoll, and KQueue from entering a native wait when a signal exception becomes pending during the GVL transition. On Ruby versions without RB_NOGVL_PENDING_INTR_FAIL, the fallback now refreshes pending-interrupt state immediately before releasing the GVL while preserving the caller's exception-delivery timing.
devel/ruby-io-event: upddate to 1.19.2 1.19.2 (2026-07-12) * 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.
devel/ruby-io-event: update to 1.19.1 1.17.0 (2026-06-28) * Report inherited selector objects as closed after fork, and avoid closing descriptors they no longer own. 1.18.0 (2026-06-30) * Fixed: Avoid entering a blocking native selector wait when an interrupt is already pending for the current thread. 1.19.0 (2026-06-30) * 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. 1.19.1 (2026-06-30) * 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.
devel/ruby-io-event: update to 1.16.4 1.16.2 (2026-06-13) * Improve timer heap performance by batching scheduled timer insertion, compacting cancelled timers during flush, and avoiding unnecessary heap rebuilds for small incremental inserts. 1.16.3 (2026-06-23) * 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. 1.16.4 (2026-06-24) * Correctly implement Interrupt#signal so that it is robust enough to be called by Scheduler#unblock.
devel/ruby-io-event: update to 1.16.1 1.16.1 (2026-05-25) * Ensure the pure Ruby Select selector returns false, not nil, when io_wait resumes without any ready events.
devel/ruby-io-event: update to 1.16.0 1.16.0 (2026-05-12) * 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.
devel/ruby-io-event: update to 1.15.1 1.14.4 (2026-03-10) * Allow epoll_pwait2 to be disabled via --disable-epoll_pwait2. 1.14.5 (2026-03-24) * Bump patch version. 1.15.0 (2026-04-05) * Add bounds checks, in the unlikely event of a user providing an invalid offset that exceeds the buffer size. This prevents potential memory corruption and ensures safe operation when using buffered IO methods. 1.15.1 (2026-04-06) * Bump patch version.
devel/ruby-io-event: update to 1.14.3 1.14.3 (2026-03-03) * Fix several implementation bugs that could cause deadlocks on blocking writes.
devel/ruby-io-event: update to 1.14.2 1.14.1 (2025-11-16) * Minor syntax tidy up. * Mark the thread from the worker pool. (#152) 1.14.2 (2025-11-17) * Revert "Update ext/io/event/worker_pool.c" * Prefer self over poolval.
devel/ruby-io-event: update to 1.14.0
1.14.0 (2025-09-05)
Enhanced IO::Event::PriorityHeap with deletion and bulk insertion methods
The {ruby IO::Event::PriorityHeap} now supports efficient element removal
and bulk insertion:
* delete(element): Remove a specific element from the heap in O(n) time
* delete_if(&block): Remove elements matching a condition with O(n)
amortized bulk deletion
* concat(elements): Add multiple elements efficiently in O(n) time
heap = IO::Event::PriorityHeap.new
# Efficient bulk insertion - O(n) instead of O(n log n)
heap.concat([5, 2, 8, 1, 9, 3])
# Remove specific element
removed = heap.delete(5) # Returns 5, heap maintains order
# Bulk removal with condition
count = heap.delete_if{|x| x.even?} # Removes 2, 8 efficiently
The delete_if and concat methods are particularly efficient for bulk
operations, using bottom-up heapification to maintain the heap property in
O(n) time. This provides significant performance improvements:
* Bulk insertion: O(n log n) → O(n) for adding multiple elements
* Bulk deletion: O(k×n) → O(n) for removing k elements
Both methods maintain the heap invariant and include comprehensive test
coverage with edge case validation.
devel/ruby-io-event: update to 1.13.0 1.13.0 (2025-09-01) * Add IO::Event::PriorityHeap#empty?. * Update context documentation on release.
devel/ruby-io-event: update to 1.12.1 1.11.1 (2025-07-02) * Fix read_nonblock when using the URing selector, which was not handling zero-length reads correctly. This allows reading available data without blocking. 1.11.2 (2025-07-02) * Fix Windows build. 1.12.0 (2025-07-13) * Ensure work can be cancelled while still in the queue. * 100% documentation coverage. * Remove deprecated code. * Fix Ruby version support + more tests. * Fix Windows non-block IO. 1.12.1 (2025-07-23) * Forward **options in raise.
devel/ruby-io-event: update to 1.11.0
1.11.0 (2025-06-13)
Introduce IO::Event::WorkerPool for off-loading blocking operations.
The {ruby IO::Event::WorkerPool} provides a mechanism for executing blocking
operations on separate OS threads while properly integrating with Ruby's
fiber scheduler and GVL (Global VM Lock) management. This enables true
parallelism for CPU-intensive or blocking operations that would otherwise
block the event loop.
# Fiber scheduler integration via blocking_operation_wait hook
class MyScheduler
def initialize
@worker_pool = IO::Event::WorkerPool.new
end
def blocking_operation_wait(operation)
@worker_pool.call(operation)
end
end
# Usage with automatic offloading
Fiber.set_scheduler(MyScheduler.new)
# Automatically offload `rb_nogvl(..., RB_NOGVL_OFFLOAD_SAFE)` to a background thread:
result = some_blocking_operation()
The implementation uses one or more background threads and a list of pending
blocking operations. Those operations either execute through to completion
or may be cancelled, which executes the "unblock function" provided to
rb_nogvl.
devel/ruby-io-event: update to 1.10.2 1.10.2 (2025-06-08) * Improved consistency of handling closed IO when invoking #select.
devel/ruby-io-event: update to 1.10.1 1.10.1 (2025-05-22) * Cleanup benchmark code. * Use append_cflags instead of modifying CFLAGS directly (#137)
devel/ruby-io-event: update to 1.10.0 1.10.0 (2025-03-12) * IO::Event::Profiler is moved to dedicated gem: fiber-profiler. * Perform runtime checks for native selectors to ensure they are supported in the current environment. While compile-time checks determine availability, restrictions like seccomp and SELinux may still prevent them from working.
devel/ruby-io-event: update to 1.9.0 1.9.0 (2025-02-10) * Improved IO::Event::Profiler for detecting stalls.
devel/ruby-io-event: update to 1.8.4 1.8.0 (2025-02-05) Detecting fibers that are stalling the event loop. A new (experimental) feature for detecting fiber stalls has been added. This feature is disabled by default and can be enabled by setting the IO_EVENT_SELECTOR_STALL_LOG_THRESHOLD to true or a floating point number representing the threshold in seconds. When enabled, the event loop will measure and profile user code when resuming a fiber. If the fiber takes too long to return back to the event loop, the event loop will log a warning message with a profile of the fiber's execution. > cat test.rb #!/usr/bin/env ruby require_relative "lib/async" Async do Fiber.blocking do sleep 1 end end > IO_EVENT_SELECTOR_STALL_LOG_THRESHOLD=true bundle exec ./test.rb Fiber stalled for 1.003 seconds /home/samuel/Developer/socketry/async/test.rb:6 in '#<Class:Fiber>#blocking' (1s) /home/samuel/Developer/socketry/async/test.rb:7 in 'Kernel#sleep' (1s) There is a performance overhead to this feature, so it is recommended to only enable it when debugging performance issues. 1.8.1 (2025-02-05) * Fix macOS build issues. * Initial rework of call tracking. 1.8.2 (2025-02-05) * Rename event -> call. * Fix profiling. 1.8.3 (2025-02-05) * Output profile log as JSON if !istty. 1.8.4 (2025-02-05) * Correctly calculate total duration in output formatting.
devel/ruby-io-event: update to 1.7.5 1.7.5 (2024-12-15) * Fix process_wait race condition on EPoll that could cause a hang.
devel/ruby-io-event: update to 1.7.4 1.7.4 (2024-11-24) * Check the process status before waiting, it appears to be edge triggered. (#125)
devel/ruby-io-event: update to 1.7.3 1.7.3 (2024-10-11) * Prefer static const over enum. * Add write barriers to IO_Event_Selector_resume/_raise. (#124)
devel/ruby-io-event: update to 1.7.2 1.7.2 (2024-10-16) * Add fifo test. (#91) * Initial support for pread/pwrite in uring backend. * Add debug workflow with sanitizers enabled. (#115) * Add waiting fiber write barrier for all selector implementations. (#122)
devel/ruby-io-event: update to 1.7.1 1.7.1 (2024-10-04) What's Changed * Include free list size in URing memsize by @casperisfine in #120 * Prefer RB_OBJ_WRITE over RB_OBJ_WRITTEN by @casperisfine in #119 * Trigger write barriers when setting IO_Event_Selector_EPoll_Descriptor.io by @casperisfine in #118
devel/ruby-io-event: update to 1.6.5 1.6.5 (2024-06-23) What's Changed * Fix idle load computation. by @ioquatix in #110
devel/ruby-io-event: update to 1.6.4 1.6.3 (2024-06-12) * Always use rb_to_float. (#108) 1.6.4 (2024-06-12) * Timers#after converts argument to float. (#109)
devel/ruby-io-event: update to 1.6.2 1.6.1 (2024-06-12) * Fix typo in readme.md (#103) * Include invalid duration in error message. (#104) 1.6.2 (2024-06-12) * Support conversion of T_BIGNUM. (#105) * Rename Timers::Handle#offset to #time as it's more accurate. (#106) * Conditionally include <sys/wait.h> for WNOHANG. (#107) - On some systems it's not present.
devel/ruby-io-event: update to 1.6.0 1.6.0 (2024-06-03) * Fix IO_Event_Selector_EPoll -> KQueue typo. * Increase duration of select to avoid issues on slow systems. * Add priority heap and timers implementation. (#100)
devel/ruby-io-event: update to 1.5.1 1.5.0 (2024-03-04) * Modernize gem. * Expose #idle_duration - for experimental load calculation. (#101) 1.5.1 (2024-03-04) * Ensure the idle_duration is zeroed if it won't be captured.
devel/ruby-io-event: update to 1.4.4 1.4.4 (2024-02-16) * Fix mingw build (#95) * Remove unused variable.
devel/ruby-io-event: update to 1.4.3 upstream merge patch-ext_io_event_selector_selector.h. 1.4.3 (2024-02-05) * Add <sys/wait.h> for WNOHANG. by @ioquatix in #94
devel/ruby-io-event: update to 1.4.2 1.3.3 (2023-12-28) What's Changed * Correctly pass through flags rb_process_status_wait. by @ioquatix in #81 * Ensure that the saved node is freed correctly if an exception occurs. by @ioquatix in #84 1.4.0 (2023-12-28) What's Changed * Ruby 3.3 updates (dropped support for Ruby 3.0) by @ioquatix in #85 1.4.1 (2024-01-10) * Add liburing package installation for Ubuntu tests. (#87) * Also fix #88: -std=c99 is disabling struct timespec * Always #include <ruby.h> before any system header (#89) 1.4.2 (2024-01-14) * No change except version.
devel/ruby-io-event: update to 1.3.2 1.3.0 (2023-08-23) What's Changed * Rename data -> selector. by @ioquatix in #67 * Spurious wakeups by @ioquatix in #66 * Don't use EPOLLONESHOT for the wakeup event. by @Math2 in #68 * Failing test case for waiting on a reused FD. by @Math2 in #69 * Always re-register epoll descriptor. by @ioquatix in #71 * Fix potential race conditions in io_uring backend. by @ioquatix in #70 * NetBSD/OpenBSD compatibility for KQueue selector, some FreeBSD fixes by @Math2 in #72 * Introduce correct support for compacting GC. by @ioquatix in #73 * Fix external tests by @ioquatix in #75 * Add more external tests. by @ioquatix in #74 * Run coverage tests on more Ruby versions. by @ioquatix in #76 1.3.1 (2023-08-24) What's Changed * Fix a weird bug with duplicate CQEs. by @ioquatix in #78 1.3.2 (2023-08-24) What's Changed * Ensure that every io_uring_get_sqe is used correctly. by @ioquatix in #80 * Add tests for cancellation and update pure Ruby implementation. by @ioquatix in #79
devel/ruby-io-event: update to 1.2.3 pkgsrc change: remove redundant RUBY_VERSIONS_ACCEPTED definition. 1.2.3 (2023-07-26) * Add test for zero length write. (#60) * Fix pipe test on BSD systems. (#62) * Fix Select selector backend per-IO waiter queue handling (#63) * Add some comments regarding the new implementation. * Modernize gem.
devel/ruby-io-event: update to 1.2.2 1.2.1 (2023-05-13) * Add fallback to epoll_wait if epoll_pwait2 returns ENOSYS. (#59) 1.2.2 (2023-05-14) * Fix IO_Event_Interrupt_descriptor undefined symbol. (#61)
devel/ruby-io-event: update to 1.2.0 1.2.0 (2023-05-01) What's Changed * Native improvements by @ioquatix in #56 * Minor compiler warnings fixed. * Add support for epoll_pwait2.
devel/ruby-io-event: update to 1.1.7 1.1.7 (2023-03-11) * Introduce cancellation support for asynchronous io_read and io_write operations. by @ioquatix in #55
Add ruby32 support.
devel/ruby-io-event: update to 1.1.6 1.1.5 (2023-01-05) * Don't worry about race conditions when calling @output.close. * Move all v2 implementation inside conditional. * Add experimental support for io_select hook. * Flush all pending events on every loop iteration. 1.1.6 (2023-01-10) * Constants are used by v1 implementation too. * Test nonblocking IO on non-windows platforms. (#52)
devel/ruby-io-event: update to 1.1.4 1.1.4 (2022-12-06) * Check for EV_UDATA_SPECIFIC. Fixes #39. (#49).
devel/ruby-io-event: update to 1.1.3 1.1.3 (2022-12-03) * Don't try to compile native extension on JRuby. * Fix external test runner.
devel/ruby-io-event: restrict to Ruby 3.0 and later Noted by wiz@ via private e-mail and thanks much.
devel/ruby-io-event: add package version 1.1.2 Required by ruby-async package. IO::Event Provides low level cross-platform primitives for constructing event loops, with support for select, kqueue, epoll and io_uring. Motivation The initial proof-of-concept Async was built on NIO4r. It was perfectly acceptable and well tested in production, however being built on libev was a little bit limiting. I wanted to directly built my fiber scheduler into the fabric of the event loop, which is what this gem exposes - it is specifically implemented to support building event loops beneath the fiber scheduler interface, providing an efficient C implementation of all the core operations.