From: Michael Witrant Date: 2001-09-27T22:44:03+09:00 Subject: [ruby-talk:21771] Re: opening a named pipe? On Tue, 25 Sep 2001 13:00:43 +0900, "Avdi B. Grimm" wrote: > On Mon, 2001-09-24 at 14:11, Carlos wrote: > > Maybe you can open the pipe non-blocking > > > > File.open($STATUS_FIFO_NAME, File::RDONLY | File::NONBLOCK) > > > > or something like that (I don't have the necessary documentation; I only saw > > this form of opening a file as an example of File.new in the Rubybook). > > well, that did the trick. thanks! > I'm dealing with nearly the same issue: In the main thread of my script, I would like a loop to open and read a named pipe forever. It starts some new threads to handle commands received from the pipe. But all other threads stop running when the main thread is opening the pipe for reading. Is there any reason why open disable other threads when it's waiting for the pipe? I would like to open the pipe in blocking-mode, while running other threads. Any idea? Mike.