On Sat, 16 Dec 2006, Tim Pease wrote: > $ cat a.rb > > t = Thread.new do > while true > puts "printing a line" > sleep 2 > end > end > > gets > t.exit > puts "exiting" > > > $ ruby a.rb > printing a line > printing a line > printing a line > printing a line > exiting # after I hit the "Enter" key > > > This is how it works on Linux and on Cygwin. But when I run the same > code on Windows using the one-click installer ruby, this is what I get > ... > > >> ruby a.rb > printing a line > > exiting # after I hit the "Enter" key > > > It does not matter how long I let the script run, I'm only getting the > message out of the thread once. It's like the thread never wakes up > again after it goes to sleep. > > Is this normal / expected behavior on Windows? Am I missing something > obvious? a) io and threads to not work together in the one-click installer b) cygwin does c) msys compiled ruby does -a -- if you find yourself slandering anybody, first imagine that your mouth is filled with excrement. it will break you of the habit quickly enough. - the dalai lama