IO#sysread blocks
-----------------

                 Key: JRUBY-5595
                 URL: http://jira.codehaus.org/browse/JRUBY-5595
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.6
            Reporter: Mike Perham
            Assignee: Thomas E Enebo


On 1.8.7 and 1.9.2, IO#sysread(count) will throw EAGAIN if there is no buffer 
to read, allowing me to do low-level, non-blocking IO.  It will return partial 
buffer too so if I ask for 10 bytes and there are 4 bytes available, it will 
return just 4 bytes, not block for the other 6.

Here's the code I use in Dalli:

https://github.com/mperham/dalli/blob/master/lib/dalli/socket.rb#L101

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to