read changed to blocking in 1.9 windows?

Discussion in 'Ruby' started by Roger Pack, May 25, 2009.

  1. Roger Pack

    Roger Pack Guest

    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
    --
    Posted via http://www.ruby-forum.com/.
    Roger Pack, May 25, 2009
    #1
    1. Advertising

  2. On 25.05.2009 20:40, Roger Pack wrote:
    > 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.


    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

    --
    remember.guy do |as, often| as.you_can - without end
    http://blog.rubybestpractices.com/
    Robert Klemme, May 25, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hendra Gunawan
    Replies:
    1
    Views:
    12,413
    Allan Herriman
    Apr 8, 2004
  2. Andre Kelmanson

    blocking i/o vs. non blocking i/o (performance)

    Andre Kelmanson, Oct 10, 2003, in forum: C Programming
    Replies:
    3
    Views:
    911
    Valentin Tihomirov
    Oct 12, 2003
  3. nukleus
    Replies:
    14
    Views:
    816
    Chris Uppal
    Jan 22, 2007
  4. Christian
    Replies:
    5
    Views:
    720
    Esmond Pitt
    Dec 2, 2007
  5. Serge Savoie
    Replies:
    4
    Views:
    255
    Serge Savoie
    Oct 1, 2008
Loading...

Share This Page