On 27 Mar 2008, at 09:38, Heesob Park wrote: > Hi, > > Luis Lavena wrote: >> On Mar 27, 2:41 am, "Just Another Victim of the .. Morality" >> <ihates... / hotmail.com> wrote: >>> necessarily so or can we change this? Shouldn't we like to change >>> this? >>> count += 1 >>> end >>> end >>> gets >> >> I've asked about this back in September 2007 at ruby-core mailing >> list, no answer. I'm copying my post with details more information: >> >> Hello Ruby Developers. >> >> I've been trying to determine what is wrong with this simple script: >> >> http://pastie.caboo.se/101434 >> >> t = Thread.new { >> while true >> puts "printing a line" >> sleep 2 >> end >> } >> >> gets >> t.exit >> puts "exiting" >> >> === >> >> And found that all the IO (stdin) is broken on Windows: >> custom build with MinGW (3.4.5 -- mingw special) >> custom build with VC8 >> official build VC6 >> >> All behave the same way: just 1 line of "printing a line" gets >> actually printed, and the world halt until you hit enter. Yup, complete hard block on read() >> I saw a few post dating 2003 about this... and this brakes the >> cross-platform nature of most of ruby: works on some platform, don't >> work on other. >> >> Since 1.8.6 will stay with us a bit longer, any ideas how to solve >> it? HighLine and EventMachine have both proven possible for me. I hacked together a mini-irb tool which is then more useful for stab testing something like GServer in irb. Mind you, after loading up eventmachines reactor for the keyboard, using GServer seems a little silly =) >> Park Heesob posted a patch back then, but it don't work as expected >> (this problem didn't get solved). >> >> For the record: 1.9.0 don't show this issue, but YARV is another >> different breed. Right, the blocking call is probably still there, however I've made no attempt to verify. >> >> >> Thanks in advance for your time. >> >> == >> >> Even it doesn't solve your issue, explain it better. >> >> Still, no answer, no solution :'( >> >> Regards, > > Here is the patched code of rb_win_selected function Are there any known problems with this patch?