"Long running" handlers

Virat Gohil virat.gohil at gmail.com
Fri Mar 5 10:07:18 EST 2010


On Fri, Mar 5, 2010 at 7:18 PM, infectedrhytms
<infectedrhythms at hotmail.com>wrote:

>
> Thanks
>
> By sharing what do you mean make sure to share?
>
>
> So what are the event executors added during the bootstrap???
>
> ServerBootstrap bootstrap = new ServerBootstrap(
>        new NioServerSocketChannelFactory(
>                Executors.newCachedThreadPool(),
>                Executors.newCachedThreadPool()));
>
> --
> View this message in context:
> http://n2.nabble.com/Long-running-handlers-tp4677280p4680848.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>



By sharing I mean DO NOT DO THE FOLLOWING, it will create threads for each
connection.

pipeline.addLast("Ordered", new ExecutionHandler(*new
OrderedMemoryAwareThreadPoolExecutors(...)*));

But create a single instance of OrderedMemoryAwareThreadPoolExecutors, and
keep passing the same reference for all ExecutionHandler.

HTH,

Virat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20100305/9e8c13a6/attachment.html 


More information about the netty-users mailing list