Provides low level cross-platform primitives for constructing event loops, with support for select, kqueue, epoll and io_uring.
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 build 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.
Please see the project documentation for more details.
io-event for non-blocking IO.Please see the project releases for all releases.
URing completion free-list empty check so its sole entry can be reused instead of unnecessarily allocating a new completion.URing completion records allocated until both the operation and cancellation completions have been processed.(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.IO::Event::WorkerPool cancellation interrupts a blocked fiber, while still cancelling and draining the in-flight blocking operation before returning control to Ruby.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.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.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.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.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.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.We welcome contributions to this project.
git checkout -b my-new-feature).git commit -am 'Add some feature').git push origin my-new-feature).To run the test suite:
bundle exec bake build
bundle exec sus
To make a new release:
bundle exec bake gem:release:patch # or minor or major
In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
C
54.0%
Ruby
46.0%
Provides low level cross-platform primitives for constructing event loops, with support for select, kqueue, epoll and io_uring.
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 build 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.
Please see the project documentation for more details.
io-event for non-blocking IO.Please see the project releases for all releases.
URing completion free-list empty check so its sole entry can be reused instead of unnecessarily allocating a new completion.URing completion records allocated until both the operation and cancellation completions have been processed.(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.IO::Event::WorkerPool cancellation interrupts a blocked fiber, while still cancelling and draining the in-flight blocking operation before returning control to Ruby.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.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.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.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.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.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.We welcome contributions to this project.
git checkout -b my-new-feature).git commit -am 'Add some feature').git push origin my-new-feature).To run the test suite:
bundle exec bake build
bundle exec sus
To make a new release:
bundle exec bake gem:release:patch # or minor or major
In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
C
54.0%
Ruby
46.0%