LICENSE
NEWS
README
TODO
SleepyPenguin
Epoll
Epoll::IO
Ev
EvFilt
EventFD
Inotify
Inotify::Event
Kevent
Kqueue
Kqueue::IO
Note
TimerFD
VQ
sleepy_penguin 3.5.2 / 2020-02-01 21:37 UTC
Documentation updates to switch bogomips.org to yhbt.net since
the .org TLD won't be affordable in the near future. There's
also a few warning fixes and such.
sleepy_penguin 3.5.1 / 2018-12-15 04:39 UTC
This release fixes some minor things for kqueue and clang
users. Not much going on... *yawn*
6 changes since v3.5.0 (2017-03-22):
kqueue: ensure close-on-exec flag is set
kqueue: modernize Struct usage for Ruby 2.5.0dev
fix 64-to-32-bit truncation warning
kqueue: get rid of unused variable warnings
epoll: avoid reduce block capture and ivar requests
doc: use HTTPS URLS when possible
sleepy_penguin 3.5.0 / 2017-03-22 07:21 UTC
Most notably, kevent and epoll_wait wrappers are now
nestable, so you can write your own event loops inside
somebody elses event loop (not that it's a good idea,
but hey, that's reality, sometimes).
https://bogomips.org/sleepy_penguin/SleepyPenguin/Kqueue.html#method-i-kevent
https://bogomips.org/sleepy_penguin/SleepyPenguin/Epoll.html#method-i-wait
For Linux users, there is now copy_file_range(2) support
for copying regular files:
https://bogomips.org/sleepy_penguin/SleepyPenguin.html#method-c-copy_file_range
There is also a new sendfile wrapper which emulates Linux
sendfile behavior regardless of platform. It will use the
native sendfile(2) syscall on FreeBSD and Linux, at least.
https://bogomips.org/sleepy_penguin/SleepyPenguin.html#method-c-linux_sendfile
Wrappers for the splice(2) and tee(2) syscalls also exist for
Linux users (vmsplice(2) is omitted):
https://bogomips.org/sleepy_penguin/SleepyPenguin.html#method-c-splice
https://bogomips.org/sleepy_penguin/SleepyPenguin.html#method-c-tee
Along with some related constants:
https://bogomips.org/sleepy_penguin/SleepyPenguin.html#F_GETPIPE_SZ
https://bogomips.org/sleepy_penguin/SleepyPenguin.html#F_SETPIPE_SZ
https://bogomips.org/sleepy_penguin/SleepyPenguin.html#F_MORE
https://bogomips.org/sleepy_penguin/SleepyPenguin.html#F_MOVE
https://bogomips.org/sleepy_penguin/SleepyPenguin.html#F_NONBLOCK
In other words, this release merges the useful parts of the old
"io_splice" RubyGem: https://bogomips.org/ruby_io_splice/
Linux 4.5+ epoll users also get EPOLLEXCLUSIVE along existing
constants:
https://bogomips.org/sleepy_penguin/SleepyPenguin/Epoll.html#EXCLUSIVE
Ruby 1.8 and 1.9 support are both gone, Ruby 2.0.0+ is required
for keyword args, now(*).
31 changes since 3.4.1:
README: fix wording: are => is
TODO: add memfd item
epoll: allow :CLOEXEC instead of the long constant
note the epoll/io.rb file is only for Ruby 1.8
support the splice(2) and tee(2) syscalls
implement copy_file_range support for Linux 4.5+
doc: various URL updates (https)
unify rb_gc() handling for out-of-FD conditions
splice: clarification regarding tee() flags
pkg.mk: various updates from other projects
copy_file_range: use correct syscall numbers on x86/x86-64
new API for splice and tee
doc: remove references to IO#pipe_size accessor
remove PIPE_BUF constant definition
copy_file_range: move wrapper to Ruby for keyword arg handling
gemspec: use SPDX-compatible license specifier
implement linux_sendfile support
portability fixes for systems w/o splice, copy_file_range
tests: switch to test-unit
free buffer if pthread_setspecific fails
allow nestable TLS buffers within the same thread
drop unused Ruby 1.8 support code
epoll: add newline to Kernel#warn messages for atomicity
favor require_relative over require
epoll: add EPOLLEXCLUSIVE constant and documentation
kqueue: remove IO#autoclose= and 1.8-related checks
sp_copy: remove dummy 1.8 code for non-native threaded Ruby
build: remove build-time olddoc dependency
copy_file_range: add documentation
doc: tests and examples for changing pipe size in Linux
doc: avoid incorrect links to Epoll::IO
sleepy_penguin 3.4.1 - minor updates / 2015-01-11 08:13 UTC
Most notably the mailing list is now subscription-optional
on the bogomips.org server:
sleepy-penguin@bogomips.org
If you want to keep receiving email updates, you'll need to
resubscribe by sending a message to:
sleepy-penguin+subscribe@bogomips.org
Migrating subscribers can't be done automatically as librelist
(our old host) doesn't publish subscriber lists. But you don't
have to subscribe, either, HTTP archives are available at:
http://bogomips.org/sleepy-penguin/
There you'll also find links to ssoma/public-inbox for
extracting the mail archives to git.
shortlog:
test_kqueue_io: add test for deleting items
test_inotify: add test for rm_watch
extconf: detect inotify_init1 in libc
inotify: cleanup Inotify::Event creation
switch documentation to olddoc
change mailing list to sleepy-penguin@bogomips.org
relax license to LGPLv2.1+ (from v2.1 && v3 only)
cleanup documentation links and ignores
gemspec: add dev dependency on test-unit 3.x
README: label the link to the mailing list archives
GNUmakefile: drop more RubyForge references
README: stop mentioning Rubinius
gemspec: use minitest, not test-unit
sleepy_penguin 3.4.0 - minor updates / 2015-01-11 08:09 UTC
Most notably the mailing list is now subscription-optional
on the bogomips.org server:
sleepy-penguin@bogomips.org
If you want to keep receiving email updates, you'll need to
resubscribe by sending a message to:
sleepy-penguin+subscribe@bogomips.org
Migrating subscribers can't be done automatically as librelist
(our old host) doesn't publish subscriber lists. But you don't
have to subscribe, either, HTTP archives are available at:
http://bogomips.org/sleepy-penguin/
There you'll also find links to ssoma/public-inbox for
extracting the mail archives to git.
shortlog:
test_kqueue_io: add test for deleting items
test_inotify: add test for rm_watch
extconf: detect inotify_init1 in libc
inotify: cleanup Inotify::Event creation
switch documentation to olddoc
change mailing list to sleepy-penguin@bogomips.org
relax license to LGPLv2.1+ (from v2.1 && v3 only)
cleanup documentation links and ignores
gemspec: add dev dependency on test-unit 3.x
README: label the link to the mailing list archives
GNUmakefile: drop more RubyForge references
README: stop mentioning Rubinius
gemspec: use minitest, not test-unit
sleepy_penguin 3.3.0 - fixes and compatibility improvements / 2013-12-30 01:29 UTC
Most notably, this fixes memory leaks for any users of inotify
reads, epoll/kevent waiting using short-lived thread. Users of
long-lived threads for these functions (all Rainbows!, yahns, and
zbatery users) are not affected. A fair amount of internal cleanup
was necessary for this.
Compatibility with non-Linux systems without clock_gettime is
improved, thanks to Lin Jen-Shin.
Note: the kevent code is not at all optimized and still uses
RARRAY_PTR, so it likely sucks under rbx and MRI 2.1.
Eric Wong (13):
test_epoll: minor compatibility fix for Ruby 2.1.0
avoid RARRAY_PTR usage for Linux-only bits
init: avoid redefinition warning for _GNU_SOURCE
Rakefile: kill raa_update task
util: minor cleanup to favor rb_io_get_io
tests: switch to minitest
test_epoll: switch test_dup_and_fork to exit!
remove all signalfd-related files
tests: remove version-dependent FD_CLOEXEC checks
work around lack of rb_io_get_io in Rubinius
value2timespec: use StringValueCStr for correctness
refactor and fix leak from thread-local storage use
extconf: avoid unnecessary linkage against libkqueue
Lin Jen-Shin (1):
Support for broken system without clock_gettime.
sleepy_penguin 3.2.0 - minor bug fixes, preliminary kqueue support / 2013-07-16 18:25 UTC
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.
sleepy_penguin 3.1.0 - minor fixes and features / 2012-05-02 09:01 UTC
* add TimerFD::CANCEL_ON_SET constant
ref: http://www.man7.org/tlpi/api_changes/
* fix concurrent Epoll#wait on the same epoll fd
* SignalFD interface removed (unworkable with Ruby runtimes)
* use rb_update_max_fd() if available (Ruby 1.9.3)
* reintroduce SLEEPY_PENGUIN_VERSION constant ("3.1.0")
sleepy_penguin 3.0.1 - really avoids EINTR / 2011-05-21 02:40 UTC
One bugfix:
* epoll: avoid race condition in EINTR checking
Even if we timeout while getting an EINTR, we'll retry
epoll_wait() with a zero timeout like IO.select does in Ruby to
avoid raising Errno::EINTR.
sleepy_penguin 3.0.0 / 2011-05-21 00:22 UTC
Epoll#wait always waits the specified amount of time and never
raises Errno::EINTR.
Disabled operations on Fixnum file descriptors, only IO objects
may be passed to Epoll methods.
Cross-thread Epoll#close behavior matches Ruby 1.9.3dev.
Improved Rubinius support (lightly tested).
sleepy_penguin 2.0.0 / 2011-03-10 04:43 UTC
There are many internal cleanups, bugfixes, and incompatible
API changes. The API will probably be stable from now on.
All the flag passing is less verbose, in the past you had
to do:
tfd = TimerFD.new(TimerFD::CLOEXEC|TimerFD::NONBLOCK)
Now, you can just do (the old way still works):
tfd = TimerFD.new([:CLOEXEC, :NONBLOCK])
A SignalFD interface now exists, but is not recommended since
MRI signal handling seems to conflict with it.
Inotify#close no longer holds the GVL while closing the
descriptor since it is an expensive operation.
See git log v1.4.0..v2.0.0 for all the gory details.
sleepy_penguin 1.4.0 - Linux I/O events for Ruby / 2011-02-04 22:27 UTC
* Epoll#wait: do not automatically retry on EINTR
* preliminary Inotify support
* Epoll.new no longer defaults to close-on-exec
TODO: FANotify + SignalFD
sleepy_penguin 1.3.1 - safety checks for delete / 2011-01-22 00:52 UTC
One bugfix for Epoll#delete:
Eric Wong (1):
safer closed checks for proxied objects
sleepy_penguin 1.3.0 - incremental improvements / 2011-01-21 23:12 UTC
This release introduces compatibility with pre-EPOLLRDHUP
systems.
It also optimizes syscalls away for Epoll#set and Epoll#delete.
Epoll#add, Epoll#mod and Epoll#del should no longer be needed in
most code.
sleepy_penguin 1.2.0 - epoll GC help / 2011-01-15 12:06 UTC
One convenience fix:
epoll: prevent IO objects from getting GC-ed
Users of our code may forget to keep references for their IO
objects at all, and since it's not possible for GC to mark
kernel memory, we just hold on to the IO objects for them.
We can't unmark close()d file descriptors, ever, so we don't
bother with the EPOLL_CTL_DEL case, either. Just storing IO
objects in an array using the raw descriptor as a key will allow
bounded space usage just like the in-kernel FD tables as long
as the user remembers to close descriptors themselves.
sleepy_penguin 1.1.1 - soft feathers, soft delete / 2011-01-13 22:41 UTC
SleepyPenguin::Epoll#delete method added for "soft" failures
Documentation updates and cleanups, the website is now
JavaScript-free!
(Ignore the 1.1.0 "release", it was a lie)
sleepy_penguin 1.0.0 / 2010-09-26 06:31 UTC
Initial release
mail archives: https://yhbt.net/sleepy-penguin/
public: sleepy-penguin@yhbt.net
source code: git clone https://yhbt.net/sleepy_penguin.git