sleepy_penguin provides access to newer, Linux-only system calls to wait
on events from traditionally non-I/O sources. Bindings to the eventfd,
timerfd, inotify, and epoll interfaces are provided. Experimental
support
for kqueue on FreeBSD (and likely OpenBSD/NetBSD) are also provided.
Unlike common event libraries geared towards single-threaded use
sleepy_penguin exposes one-shot notifications for both epoll and
kqueue and allows one thread to modify the watchlist while others
sleep on it.
- sleepy_penguin - Linux I/O events for Ruby
- [email protected]
- git://bogomips.org/sleepy_penguin.git
- sleepy_penguin news
Changes:
epoll support and thread-safety improvements. The dangerous
Epoll::IO interface is now an option for those who want to share an
epoll descriptor across fork and maintain their own IO object
references to avoid extra overhead. Use the regular (high-level)
Epoll interface unless you’re willing to shoot yourself in the face.
There is also preliminary Kqueue support (which should work under
libkqueue on Linux). Similar to our epoll interface (and unlike
most event libraries/frameworks) our kqueue interface also supports
one-shot notifications and embraces multi-threaded use.
Note: unlike epoll, kqueue has close-on-fork behavior, so kqueue
descriptors are not (ever) inheritable across fork.
Added EPOLLWAKEUP constant (Linux 3.5 + glibc 2.17 required) to
allow descriptors to prevent system suspend while active
(this requires the CAP_BLOCK_SUSPEND privilege).
Inotify and Epoll interfaces now use thread-local buffers for
thread-safety and improved concurrency without GVL.
Errno::EINTR is no longer propagated into Ruby-land, for consistency
with existing Ruby IO APIs.