From: Gabriele Marrone Date: 2006-11-02T02:27:02+09:00 Subject: Re: Nonblocking IO read Il giorno 01/nov/06, alle ore 01:33, ara.t.howard@noaa.gov ha scritto: >> The select() function (Kernel#select, in Ruby) is the standard way >> to do IO multiplexing under Unix. You give it a list of file >> handles on which you're waiting to be able to read or write, and >> it returns when one or more of them is ready. Windows provides a >> select() function, too, but it only supports sockets (not pipes or >> ordinary file IO.) The Win32 API generally doesn't provide non- >> blocking IO methods, because it's assumed you'll use threads if >> you want to do something else while waiting for IO. > > right. but ruby's thread are green and, on windows, block the > entire process > when waiting on IO so not an option here. I thought Ruby internally uses non-blocking I/O in order to avoid that a green thread reading something blocks every other thread: am I wrong? Or is this true just under unix?