From: Eric Wong <normalperson@yhbt.net>
To: ruby.io.splice@librelist.com
Subject: [RFC] try* interfaces in io_splice 2.2.0.18.g3025
Date: Mon, 28 Feb 2011 01:19:50 +0000 [thread overview]
Message-ID: <20110228011950.GA31141@dcvr.yhbt.net> (raw)
In-Reply-To: <20110228011950.GA31141@dcvr.yhbt.net>
$ gem install --pre io_splice
It's also up at git://bogomips.org/ruby_io_splice.git in master.
This adds IO.trytee and IO.trysplice which behave like their
non-trying counterparts with the following exceptions:
1) IO::Splice::F_NONBLOCK is implied/forced.
IO.trysplice may still block if the non-pipe descriptor blocks, so
users should always set non-blocking on that descriptor.
2) Unlike the established Kgio, this returns :EAGAIN instead
of :wait_readable or :wait_writable. This is because only
the user of the code can tell which descriptor is actually
full/empty.
There is no IO.tryvmsplice, I haven't figured out if IO.vmsplice is
useful or not and non-blocking I/O with iovecs is so painful to deal
with it's not worth it.
The flags argument of all these interfaces is now optional and will
default to zero (and IO::Splice::F_NONBLOCK for IO.try{splice,tee}).
--
Eric Wong
next parent reply other threads:[~2011-02-28 1:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 1:19 Eric Wong [this message]
2011-02-28 1:25 ` [RFC] try* interfaces in io_splice 2.2.0.18.g3025 Eric Wong
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/ruby_io_splice/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110228011950.GA31141@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=ruby.io.splice@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/ruby_io_splice.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).