[前][次][番号順一覧][スレッド一覧]

ruby-changes:8231

From: akr <ko1@a...>
Date: Sat, 11 Oct 2008 22:44:44 +0900 (JST)
Subject: [ruby-changes:8231] Ruby:r19759 (trunk): rdoc update.

akr	2008-10-11 22:44:31 +0900 (Sat, 11 Oct 2008)

  New Revision: 19759

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19759

  Log:
    rdoc update.

  Modified files:
    trunk/io.c

Index: io.c
===================================================================
--- io.c	(revision 19758)
+++ io.c	(revision 19759)
@@ -1801,6 +1801,16 @@
  *  read_nonblock reads from the buffer like readpartial.
  *  In this case, read(2) is not called.
  *
+ *  read_nonblock can emulate blocking read as follows.
+ *
+ *    begin
+ *      result = io.read_nonblock(maxlen)
+ *    rescue Errno::EINTR
+ *      retry
+ *    rescue Errno::EWOULDBLOCK, Errno::EAGAIN
+ *      IO.select([io])
+ *      retry
+ *    end
  */
 
 static VALUE
@@ -1832,6 +1842,16 @@
  *
  *  If the write buffer is not empty, it is flushed at first.
  *
+ *  write_nonblock can emulate blocking write as follows.
+ *
+ *    begin
+ *      result = io.write_nonblock(string)
+ *    rescue Errno::EINTR
+ *      retry
+ *    rescue Errno::EWOULDBLOCK, Errno::EAGAIN
+ *      IO.select(nil, [io])
+ *      retry
+ *    end
  */
 
 static VALUE

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]