From: Robert Klemme Date: 2004-11-27T21:27:54+09:00 Subject: Re: [ANN] Multiplexer - linear non-blocking I/O "Gyoung-Yoon Noh" schrieb im Newsbeitrag news:ff903fda04112610215fe2dc03@mail.gmail.com... > Until one thread terminates a system call like IO-related task, other > threads will be blocked. Kernel does not know ruby's (userland) > threads, so if your application needs concurrency in massive IO tasks, > maybe you should implement a kind of thread scheduler by yourself. OK, > Kernel#fork will be an another choice. > > If 'thread' is only sufficient for all, why did Sun adopt NIO in Java2 > 1.4? Because threads have a certain overhead and Sun wanted to provide a means to write high performance (i.e. highly optimized) servers. Apart from that I think they wanted to make the IO architecture more flexible and modular. That said, a solution with threads and blocking IO is still more elegant IMHO. It's just that for some circumstances this is not the right solution. Kind regards robert