On Thu, 01 Sep 2005 09:58:49 -0700, Doug Cutting wrote: > Kelvin Tan wrote: >> Each of these stages will be handled in its own thread (except >> for HTML parsing and scoring, which may actually benefit from >> having multiple threads). With the introduction of non-blocking >> IO, I think threads should be used only where parallel >> computation offers performance advantages. >> >> Breaking up HttpRequest and HttpResponse, will also pave the way >> for a non-blocking HTTP implementation. >> > I have never been able to write a async version of things with > Java's nio that outperforms a threaded version. In theory it is > possible, since you can avoid thread switching overheads. But in > practice I have found it difficult. > > Doug
Interesting. I haven't tried it myself. Do you have any code/benchmarks for this? Are you aware of others facing the same problem? k
