Thread contention

"이희승 (Trustin Lee)" trustin at gmail.com
Mon Jun 21 10:28:23 EDT 2010


The executor you specify when you create a ChannelFactory is not related
with rejecting clients.  The NIO transport keeps the number of active
threads minimum so you don't need to specify the upper limit.  Just
close the accepted channel under load by calling Channel.close() in
SimpleChannelHandler.channelOpen().

If you are interested in the internals, please refer to the classes in
org.jboss.netty.channel.socket.nio, especially NioWorker and
NioServerSocketPipelineSInk.

On 06/21/2010 10:01 PM, mrochon wrote:
> 
> I need to set bounds on the maximum number of queued tasks so that at a
> certain point I can reject them and notify the client that we are too busy.
> 
> Can you point me to where in the code the tasks are being executed on the
> thread pool so that I can figure out why the bounded thread pool model
> doesn't work as expected?

-- 
what we call human nature in actuality is human habit
http://gleamynode.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 293 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100621/0675b498/attachment.bin 


More information about the netty-users mailing list