Blocking IO in Windows threads

Discussion in 'Ruby' started by Robert Sheehan, Jan 12, 2005.

  1. Under Linux the following code from Dave Thomas doesn't block.

    Thread.new do
    loop do
    puts "You said #{gets}"
    end
    end

    10.times do
    sleep(1)
    puts "Say something"
    end

    But under Windows with the latest one-click installer, it does.
    Any ideas on how I can do something similar on Windows? It also doesn't
    seem to have "io/wait".

    Thanks
     
    Robert Sheehan, Jan 12, 2005
    #1
    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:
    13,078
    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:
    998
    Valentin Tihomirov
    Oct 12, 2003
  3. nukleus
    Replies:
    14
    Views:
    913
    Chris Uppal
    Jan 22, 2007
  4. Christian
    Replies:
    5
    Views:
    761
    Esmond Pitt
    Dec 2, 2007
  5. Replies:
    0
    Views:
    306
Loading...

Share This Page