Confused about Netty NIO

Iain McGinniss iainmcgin at gmail.com
Thu Oct 15 10:21:08 EDT 2009


2009/10/15 Holger Hoffstätte <holger.hoffstaette at googlemail.com>

>
> In Java you will _always_ end up with at least one thread per *concurrent
> activity* since Java does not have continuations - the ability to freeze a
> running activity in-flight and resume it later. For that you need a
> user-level activity scheduler and some form of compiler or byte code
> weaving support.


 I'm not sure I see how this is relevant - queueing of requests and
processing by a fixed sized thread pool, or pool dynamically sized to the
backlog of work in the queue, is fine in the majority of cases. If you split
up the tasks into appropriately sized Runnables which queue their successors
in the pool, things should run quite smoothly. Yes, it's not as automatic as
microthread implementations like Kilim offer, but I find it does make you
think more carefully about how to logically deconstruct the task flow.

Iain
www.onedrum.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20091015/6444bc96/attachment.html 


More information about the netty-users mailing list