sleepy_penguin RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: sleepy.penguin@librelist.com
Subject: [sleepy.penguin] [ANN] sleepy_penguin 2.0.0 - Linux I/O events for Ruby
Date: Thu, 10 Mar 2011 05:02:02 +0000	[thread overview]
Message-ID: <20110310050202.GA27160@dcvr.yhbt.net> (raw)
In-Reply-To: <20110310050202.GA27160@dcvr.yhbt.net>

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, signalfd and epoll interfaces are provided.

* http://bogomips.org/sleepy_penguin/
* sleepy.penguin@librelist.com
* git://bogomips.org/sleepy_penguin.git

== Disclaimer

  I've mainly written this to force myself to learn some of the newer
  APIs in Linux 2.6 but maybe someone will find them useful one day.

  If you're writing portable software or want something other people use
  in production, consider Cool.io[1] or EventMachine[2] instead.

== Features

* Thread-safe blocking operations under both Ruby 1.8 and 1.9.

* IO-like objects are backwards-compatible with IO.select.

* Epoll interface is fork-safe and GC-safe

* Unlike portable event frameworks, the Linux-only Epoll interface
  allows using edge-triggered I/O for possibly improved performance

* Fully-documented and user-friendly API

Changes since 1.4.0:

  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.

[1] - http://coolio.github.com/
[2] - http://rubyeventmachine.com/

-- 
Eric Wong


           reply	other threads:[~2011-03-10  5:02 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20110310050202.GA27160@dcvr.yhbt.net>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/sleepy_penguin/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110310050202.GA27160@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=sleepy.penguin@librelist.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/sleepy_penguin.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).