From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id E93E420958; Wed, 22 Mar 2017 07:27:33 +0000 (UTC) Date: Wed, 22 Mar 2017 07:27:33 +0000 From: Eric Wong To: ruby-talk@ruby-lang.org, sleepy-penguin@bogomips.org Subject: [ANN] sleepy_penguin 3.5.0 - Linux I/O events (and more) for Ruby Message-ID: <20170322072733.GA26884@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: 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) is also provided. * homepage: https://bogomips.org/sleepy_penguin/ * git clone git://bogomips.org/sleepy_penguin.git * Atom feed: https://bogomips.org/sleepy_penguin/NEWS.atom.xml * mailing list: sleepy-penguin@bogomips.org * mail archives: https://bogomips.org/sleepy-penguin/ nntp://news.public-inbox.org/inbox.comp.lang.ruby.sleepy-penguin https://bogomips.org/sleepy-penguin/new.atom Changes: sleepy_penguin 3.5.0 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 (*) Even ruby 2.1 is unsupported by ruby-core upstream; but I could be prodded to re-add 1.9.3 support if somebody really wants it...