You're sure to know more about it than I. The "one byte" thing makes sense also, since we do get a valid gem eventually...it's just that last read that ends up getting stuck.

If there's a better way to do this, or an fcntl fix that needs to be made, I'm all for it. So far, however, this primitive fix seems to have resolved all issues without introducing any new ones. If you can whip up someting better please give it a shot, otherwise we'll probably go with this for 0.9.0.

On 6/16/06, Evan Buswell <[EMAIL PROTECTED]> wrote:
An nio socket will block on read() until it has read at least one byte.
There's crap for documentation on this, but I tested it. However, our
implementation will loop the read() until we've read as much as sysread
wants (in accordance with the concept of blocking sysread). My guess
would be the problem has to do with an unimplemented fcntl to make the
socket nonblocking. Another possibility is that the loop doesn't
properly distinguish between EOF and no data, though I would expect a
100% cpu loop in that case.

Note that I haven't had a chance to look over the patch yet.

Evan


--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ jruby.sourceforge.net
Application Architect @ www.ventera.com
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to