You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New I/O for Ruby (nio4r): cross-platform asynchronous I/O primitives for
scalable network clients and servers. Modeled after the Java NIO API, but
simplified for ease-of-use.
nio4r provides an abstract, cross-platform stateful I/O selector API for Ruby.
I/O selectors are the heart of "reactor"-based event loops, and monitor
multiple I/O objects for various types of readiness, e.g. ready for reading or
writing.
Projects using nio4r
ActionCable: Rails 5 WebSocket protocol, uses nio4r for a WebSocket server
Celluloid: Actor-based concurrency framework, uses nio4r for async I/O
nio4r is not a full-featured event framework like EventMachine or Cool.io.
Instead, nio4r is the sort of thing you might write a library like that on
top of. nio4r provides a minimal API such that individual Ruby implementers
may choose to produce optimized versions for their platform, without having
to maintain a large codebase.
Releases
Bump the version first:
bundle exec bake gem:release:version:patch
CRuby
rake clean
rake release
JRuby
You might need to delete Gemfile.lock before trying to bundle install.
# Ensure you have the correct JDK:
pacman -Syu jdk-openjdk
archlinux-java set java-19-openjdk
# Ensure you are using jruby:
chruby jruby
bundle update
# Build the package:
rake clean
rake compile
rake release
About
Cross-platform asynchronous I/O primitives for scalable network clients and servers.