From: Kevin McConnell Date: 2004-10-06T23:59:48+09:00 Subject: Re: Thinking about Threaded IO Brian Candler wrote: > IO#read and IO#gets work properly; in other words Ruby wraps the calls > appropriately to make sure they never block the interpreter engine. Not sure if any of you use Windows, but it's probably worth pointing out that on Windows IO#gets *does* block all threads. E.g. if I run the following: thread = Thread.new { i=0; while(true); puts i+=1; sleep 1; end } sleep 10 str = $stdin.gets sleep 10 It should display the numbers 1 to 10, and then go suspiciously quiet until you provide the input to gets. Once you do that, you'll get the numbers 11 to 20. Cheers, Kevin