Forum: Ruby read changed to blocking in 1.9 windows?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2009-05-25 20:40
Currently with 1.9 if you do a
#include<ruby.h>

by default it overwrites any calls to 'read' and 'accept' (etc.) to be
rb_w32_read, rb_w32_accept (etc).

This worked all right in 1.8.6.
However, with 1.9 it would appear that inexplicably rb_w32_read, if it
would block (i.e. no data) blocks now, until data is ready.  Thus
rb_w32_read behaves differently than the old read used to, and
differently than the way linux' read does.
Is this a bug?  I assume it is?
Thanks.
-=r
E0d864d9677f3c1482a20152b7cac0e2?d=identicon&s=25 Robert Klemme (Guest)
on 2009-05-25 21:52
(Received via mailing list)
On 25.05.2009 20:40, Roger Pack wrote:
> differently than the way linux' read does.
> Is this a bug?  I assume it is?
> Thanks.

Maybe that's a side effect of using real threads in 1.9.  In that case
using blocking IO might be OK.

Kind regards

  robert
This topic is locked and can not be replied to.