From: Eleanor McHugh Date: 2009-09-08T01:11:23+09:00 Subject: Re: Executing system commands in threads under Ruby 1.8.6 On 7 Sep 2009, at 12:56, Bertram Scharpf wrote: > I cannot open the above link. So I rewrite Joel's code snippet > using backticks: > > t = Thread.new { > puts `echo foo; sleep 1; echo bar` > } > puts `echo baz; sleep 1; echo quux` > t.join > > Stricly spoken it's not blocking. The "baz" is written to its pipe > before "bar". But it is stored until "quux" is echoed and puts is > asked to write it out. From Ruby's perspective the backtick is definitely a blocking IO operation, just as it is in shell script. Ellie Eleanor McHugh Games With Brains http://slides.games-with-brains.net ---- raise ArgumentError unless @reality.responds_to? :reason