From: nobu.nokada@... Date: 2003-09-25T08:53:28+09:00 Subject: Re: When threads block Hi, At Wed, 24 Sep 2003 22:38:58 +0900, Hans Fugal wrote: > Ok, I jumped the gun just a little. On linux /most/ things don't block. > But /some/ things do. e.g. > > thread = Thread.new do > fifo = File.open("fifo","r") > l = fifo.readline > puts "#{Time.new} #{l}" > end > > puts "#{Time.new} bar" > thread.join You can use IO::NONBLOCK with IO::RDONLY instead of "r". > Is there a list of these sorts of things? I need to know what to expect if > I'm going to be able to use ruby for this (soft) real-time application. File#flock, and some Socket methods do. Use resolv-replace.rb for the latter. -- Nobu Nakada