"Christian" <christians / syd.microforte.com.au> wrote: > >"Michael Schuerig" <schuerig / acm.org> wrote: > > > Mathieu Bouchard <matju / cam.org> wrote: > > > > I don't know whether select() works at all on regular files. > > > At least it looks as if it does. > >This is very likely outside the interest of the discussion, but Linux's >select() is extremely slow. Reference please? This conflicts with my understanding that the select call as implemented in Linux is the standard Unix call. If the timeout is 0 it polls, else it blocks. (And yes, it does block the parent process which means that with Ruby's threading model it will block all threads unless Ruby is internally handling this in some way.) >It polls, and will block the calling process. This may be relevant if you >are select()ing on file handles (to pipes) on a machine that is network >laden. I suspect that you are misunderstanding a result from the infamous mindcraft tests. If multiple processes are waiting on a port and data comes in, all of them wake at once. The result under load of this "thundering herd" problem was quite drastic. The 2.4 kernel has solved this with a "wake-one" semantic. An excellent background reference on network scalability is: http://www.kegel.com/c10k.html Cheers, Ben _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com