ruby-changes:14849
From: akr <ko1@a...>
Date: Fri, 19 Feb 2010 21:52:12 +0900 (JST)
Subject: [ruby-changes:14849] Ruby:r26715 (trunk): rdoc update.
akr 2010-02-19 21:52:03 +0900 (Fri, 19 Feb 2010) New Revision: 26715 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26715 Log: rdoc update. Modified files: trunk/io.c Index: io.c =================================================================== --- io.c (revision 26714) +++ io.c (revision 26715) @@ -1941,14 +1941,21 @@ * until io is readable for avoiding busy loop. * This can be done as follows. * + * # emulates blocking read (readpartial). * begin * result = io.read_nonblock(maxlen) - * rescue IO::WaitReadable, Errno::EINTR + * rescue IO::WaitReadable * IO.select([io]) * retry * end * - * Note that this is identical to readpartial + * Although IO#read_nonblock doesn't raise IO::WaitWritable. + * OpenSSL::Buffering#read_nonblock can raise IO::WaitWritable. + * If IO and SSL should be used polymorphically, + * IO::WaitWritable should be rescued too. + * See the document of OpenSSL::Buffering#read_nonblock for sample code. + * + * Note that this method is identical to readpartial * except the non-blocking flag is set. */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/