ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: Aaron Patterson <tenderlove@ruby-lang.org>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:41165] Re: [Ruby 1.9 - Bug #5138][Open] Add nonblocking IO that does not use exceptions for EOF and EWOULDBLOCK
Date: Sun, 20 Nov 2011 14:05:20 +0900	[thread overview]
Message-ID: <20111120050510.GB76071@higgins.local> (raw)
In-Reply-To: <redmine.issue-5138.20110802073514@ruby-lang.org>

[-- Attachment #1: Type: text/plain, Size: 1444 bytes --]

On Tue, Aug 02, 2011 at 07:35:15AM +0900, Yehuda Katz wrote:
> 
> Issue #5138 has been reported by Yehuda Katz.
> 
> ----------------------------------------
> Bug #5138: Add nonblocking IO that does not use exceptions for EOF and EWOULDBLOCK
> http://redmine.ruby-lang.org/issues/5138
> 
> Author: Yehuda Katz
> Status: Open
> Priority: Normal
> Assignee: Yukihiro Matsumoto
> Category: core
> Target version: 1.9.4
> ruby -v: ruby 1.9.4dev (2011-07-31 trunk 32788) [x86_64-darwin11.0.0]
> 
> 
> The current Ruby I/O classes have non-blocking methods (read_nonblock and write_nonblock). These methods will never block, and if they would block, they raise an exception instead (IO::WaitReadable or IO::WaitWritable). In addition, if the IO is at EOF, they raise an EOFError.
> 
> These exceptions are raised repeatedly in virtually every use of the non-blocking methods. This patch adds a pair of methods (try_read_nonblock and try_write_nonblock) that have the same semantics as the existing methods, but they return Symbols instead of raising exceptions for these routine cases:
> 
> * :read_would_block
> * :write_would_block
> * :eof
> 
> The patch contains updates for IO, StringIO, and OpenSSL. The updates are fully documented and tested.

Bump.  Can someone please give feedback?  What needs to change in this
patch before it can be applied?

Thanks!

-- 
Aaron Patterson
http://tenderlovemaking.com/

[-- Attachment #2: Type: application/pgp-signature, Size: 487 bytes --]

  parent reply	other threads:[~2011-11-20  5:20 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01 22:35 [ruby-core:38666] [Ruby 1.9 - Bug #5138][Open] Add nonblocking IO that does not use exceptions for EOF and EWOULDBLOCK Yehuda Katz
2011-08-01 22:46 ` [ruby-core:38667] " Aaron Patterson
2011-08-01 23:06   ` [ruby-core:38669] " Urabe Shyouhei
2011-08-01 23:14     ` [ruby-core:38671] " Eric Wong
2011-08-01 23:30       ` [ruby-core:38674] " Urabe Shyouhei
2011-08-01 23:35         ` [ruby-core:38675] " Eric Wong
2011-08-01 23:42           ` [ruby-core:38676] " Urabe Shyouhei
2011-08-01 23:48             ` [ruby-core:38677] " Eric Wong
2011-08-02  0:08               ` [ruby-core:38679] " Urabe Shyouhei
2011-08-02  0:26                 ` [ruby-core:38682] " Eric Wong
2011-08-02  0:24         ` [ruby-core:38681] " Tanaka Akira
2011-08-02  5:19       ` [ruby-core:38692] " Tanaka Akira
2011-08-03  2:20         ` [ruby-core:38733] " Eric Wong
2011-08-04  4:16         ` [ruby-core:38771] " KOSAKI Motohiro
2011-08-06 10:09           ` [ruby-core:38824] " Tanaka Akira
2011-08-07  9:53             ` [ruby-core:38830] " KOSAKI Motohiro
2011-08-01 22:49 ` [ruby-core:38668] [Ruby 1.9 - Bug #5138] " Shyouhei Urabe
2011-08-01 23:19   ` [ruby-core:38673] " Yehuda Katz
2011-08-30  0:49   ` [ruby-core:39191] " Eric Wong
2011-08-01 23:07 ` [ruby-core:38670] Re: [Ruby 1.9 - Bug #5138][Open] " Eric Wong
2011-08-01 23:16   ` [ruby-core:38672] " Yehuda Katz
2011-08-02  0:08     ` [ruby-core:38680] " Eric Wong
2011-08-02  0:27       ` [ruby-core:38683] " Yehuda Katz
2011-08-02  0:02 ` [ruby-core:38678] [Ruby 1.9 - Bug #5138] " Yehuda Katz
2011-08-02  4:01 ` [ruby-core:38691] [Ruby 1.9 - Feature " Yehuda Katz
2011-08-02  8:48 ` [ruby-core:38702] " Alex Young
2011-08-03 14:03 ` [ruby-core:38745] Re: [Ruby 1.9 - Bug #5138][Open] " Tanaka Akira
2011-08-03 17:54   ` [ruby-core:38762] " Aaron Patterson
2011-08-03 20:22     ` [ruby-core:38767] " Tanaka Akira
2011-11-07 21:59 ` [ruby-core:40821] " Eric Wong
2011-11-08 16:06   ` [ruby-core:40848] " Aaron Patterson
2011-11-09 23:00     ` [ruby-core:40895] " Eric Wong
2011-11-20  5:05 ` Aaron Patterson [this message]
2011-11-20  6:30   ` [ruby-core:41167] " KOSAKI Motohiro
2011-12-15  0:12     ` [ruby-core:41660] " Eric Wong
2012-02-19 19:41 ` [ruby-core:42743] [ruby-trunk - Feature #5138] " Charles Nutter
2012-02-19 20:19 ` [ruby-core:42744] " Charles Nutter
2012-03-16  4:06 ` [ruby-core:43327] " Charles Nutter
2012-06-30 15:55 ` [ruby-core:45993] " tenderlovemaking (Aaron Patterson)
2012-06-30 16:29 ` [ruby-core:45998] " rosenfeld (Rodrigo Rosenfeld Rosas)
2012-06-30 17:47 ` [ruby-core:46002] " drbrain (Eric Hodel)
2012-06-30 19:30   ` [ruby-core:46006] " Aaron Patterson
2012-06-30 19:34 ` [ruby-core:46007] " tenderlovemaking (Aaron Patterson)
2012-06-30 19:51 ` [ruby-core:46012] " rosenfeld (Rodrigo Rosenfeld Rosas)
2012-07-01 16:58 ` [ruby-core:46064] " mame (Yusuke Endoh)
2012-07-23 12:54 ` [ruby-core:46646] " mame (Yusuke Endoh)
2013-04-23 20:25 ` [ruby-core:54531] " headius (Charles Nutter)
2013-04-23 21:19 ` [ruby-core:54533] " headius (Charles Nutter)
2013-07-09 21:24 ` [ruby-core:55884] " tenderlovemaking (Aaron Patterson)
2013-07-10  0:03   ` [ruby-core:55890] " Eric Wong
2013-07-10  0:52     ` [ruby-core:55892] " Aaron Patterson
2013-07-10  1:52       ` [ruby-core:55895] " Eric Wong
2013-07-11 17:15         ` [ruby-core:55954] " Aaron Patterson
2013-07-11 18:55           ` [ruby-core:55956] " Eric Wong
2013-07-11 20:55             ` [ruby-core:55957] " Aaron Patterson
2013-07-10  0:12 ` [ruby-core:55891] " tenderlovemaking (Aaron Patterson)
2013-07-26  7:52 ` [ruby-core:56196] Re: [Ruby 1.9 - Bug #5138][Open] " Aaron Patterson
2013-07-26 23:14   ` [ruby-core:56208] " Eric Wong
2013-07-27  4:36 ` [ruby-core:56213] [ruby-trunk - Feature #5138] " matz (Yukihiro Matsumoto)
2013-09-27 11:14 ` [ruby-core:57433] " headius (Charles Nutter)
2014-05-30  5:53 ` [ruby-core:62850] " headius

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-list from there: mbox

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

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

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

  git send-email \
    --in-reply-to=20111120050510.GB76071@higgins.local \
    --to=ruby-core@ruby-lang.org \
    /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.
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).