From: ara.t.howard@... Date: 2006-11-02T03:42:27+09:00 Subject: Re: Nonblocking IO read On Thu, 2 Nov 2006, Bill Kelly wrote: > Windows will be a problem. Admittedly, I haven't tried ruby 1.8.5 yet, > which has new nonblock_* methods. However, my expectation is that you'll > only get nonblocking behavior on windows from sockets, not from pipes. > > On Windows, calling select() on a pipe, always returns immediately with > "data ready to read", regardless if there's any data there or not. > > This has been the bane of my existence on Windows ruby for 5 or 6 years. I > do IPC on Windows ruby using TCP over loopback, instead of pipes, in order > to get nonblocking semantics. (That still doesn't help for reading from the > console, though... (search the archives for 'kbhit' for a partial solution > there...)) > > One of these years, I'd like to chat with a Windows guru and ask how he/she > would recommend making a select() that works on both sockets and pipes on > Windows. Ruby could *really* use one. maybe http://apr.apache.org/docs/apr/group__apr__poll.html -a -- my religion is very simple. my religion is kindness. -- the dalai lama