summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-19 12:52:03 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-19 12:52:03 +0000
commit54a61d3e2a130b4db054112b33e4fb4cb8818889 (patch)
treeef09f8c83535ed967c2e8bf81d475c4f71e6c2ec /io.c
parenta39e9e0745d5883b67cb84ab53e53d295e68e7b4 (diff)
rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/io.c b/io.c
index 8375838836..8026ea3784 100644
--- a/io.c
+++ b/io.c
@@ -1941,14 +1941,21 @@ io_readpartial(int argc, VALUE *argv, VALUE io)
* 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.
*/