From: Zhukov Pavel Date: 2008-06-30T19:08:11+09:00 Subject: Re: Sleep in a multithreaded environment On Mon, Jun 30, 2008 at 1:45 PM, Me Me wrote: > Zhukov Pavel wrote: >> On Mon, Jun 30, 2008 at 1:07 PM, Me Me wrote: >>> Thanks a lot in advance >>> end >>> k = n >>> end >>> -- >>> Posted via http://www.ruby-forum.com/. >>> >>> >> >> pipe=IO.popen("executable.exe") >> io=select([io],nil,nil,10) #10 - timeout >> if io==nil >> puts "DEAD" >> t1.raise("close") >> end > > Hi, > thanks for answering, I tried your code but I get: > test_th.rb:20:in `select': can't convert nil into IO (TypeError) > > Besides it's not clear to me what is done by the select. > Do I still need the thread t1 then? > Bye > -- > Posted via http://www.ruby-forum.com/. > > oh, sorry.: io=select([pipe],nil,nil,10) no, you does't, just add code if you want to catch exeption there