diff options
Diffstat (limited to 'lib/sleepy_penguin')
-rw-r--r-- | lib/sleepy_penguin/cfr.rb | 3 | ||||
-rw-r--r-- | lib/sleepy_penguin/epoll.rb | 3 | ||||
-rw-r--r-- | lib/sleepy_penguin/kqueue.rb | 3 | ||||
-rw-r--r-- | lib/sleepy_penguin/splice.rb | 4 |
4 files changed, 13 insertions, 0 deletions
diff --git a/lib/sleepy_penguin/cfr.rb b/lib/sleepy_penguin/cfr.rb index 01cc4a0..845a736 100644 --- a/lib/sleepy_penguin/cfr.rb +++ b/lib/sleepy_penguin/cfr.rb @@ -19,6 +19,9 @@ module SleepyPenguin # # See copy_file_range(2) manpage for full documentation: # http://man7.org/linux/man-pages/man2/copy_file_range.2.html + # + # This method only works in Linux 4.5+ with sleepy_penguin 3.5.0+, + # and may require up-to-date kernel headers for non-x86/x86-64 systems. def self.copy_file_range(io_in, io_out, len, flags = 0, off_in: nil, off_out: nil) __cfr(io_in, off_in, io_out, off_out, len, flags) diff --git a/lib/sleepy_penguin/epoll.rb b/lib/sleepy_penguin/epoll.rb index 4d23968..7d173c8 100644 --- a/lib/sleepy_penguin/epoll.rb +++ b/lib/sleepy_penguin/epoll.rb @@ -52,6 +52,9 @@ class SleepyPenguin::Epoll # single-threaded applications. +maxevents+ defaults to 64 events. # +timeout+ is specified in milliseconds, +nil+ # (the default) meaning it will block and wait indefinitely. + # + # As of sleepy_penguin 3.5.0+, it is possible to nest + # #wait calls within the same thread. def wait(maxevents = 64, timeout = nil) # snapshot the marks so we do can sit this thread on epoll_wait while other # threads may call epoll_ctl. People say RCU is a poor man's GC, but our diff --git a/lib/sleepy_penguin/kqueue.rb b/lib/sleepy_penguin/kqueue.rb index 2620a12..9f55efc 100644 --- a/lib/sleepy_penguin/kqueue.rb +++ b/lib/sleepy_penguin/kqueue.rb @@ -52,6 +52,9 @@ class SleepyPenguin::Kqueue # Ruby GC, otherwise ObjectSpace._id2ref may return invalid objects. # Unlike the low-level Kqueue::IO#kevent, the block given yields only # a single Kevent struct, not a 6-element array. + # + # As of sleepy_penguin 3.5.0+, it is possible to nest #kevent + # calls within the same thread. def kevent(changelist = nil, *args) @mtx.synchronize { __kq_check } if changelist diff --git a/lib/sleepy_penguin/splice.rb b/lib/sleepy_penguin/splice.rb index 5358ed5..821234b 100644 --- a/lib/sleepy_penguin/splice.rb +++ b/lib/sleepy_penguin/splice.rb @@ -53,6 +53,8 @@ module SleepyPenguin # # See manpage for full documentation: # http://man7.org/linux/man-pages/man2/splice.2.html + # + # Support for this exists in sleepy_penguin 3.5.0+ def self.splice(io_in, io_out, len, flags = 0, off_in: nil, off_out: nil, exception: true) flags = __map_splice_flags(flags) @@ -93,6 +95,8 @@ module SleepyPenguin # # See manpage for full documentation: # http://man7.org/linux/man-pages/man2/tee.2.html + # + # Support for this exists in sleepy_penguin 3.5.0+ def self.tee(io_in, io_out, len, flags = 0, exception: true) flags = __map_splice_flags(flags) ret = __tee(io_in, io_out, len, flags) |