Threads & New Connections

Bill Burke bburke at redhat.com
Thu Oct 20 09:48:01 EDT 2011


I don't think you are right.  I've been looking at the NIO code deeply 
the past few days and the set of workers is a fixed array[].  The accept 
thread does a register on a round-robin-picked worker.  If the worker is 
already started, then the accepted socket is added to the worker's 
selector.  If the worker isn't started, then it gets added to the worker 
Executor.

OiO is different though and *does* do a thread-per-connection.

On 10/20/11 9:36 AM, Norman Maurer wrote:
> Hi Bill,
>
> the "max" cocurrent io threads are limited thats right. But it may
> spin a new thread for some reasons before one can get destroyed or put
> back..
>
> See also:
> http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Help-with-limiting-number-of-possible-channels-td6464491.html#none
>
> Bye,
> Norman
>
> Ps: I think its also somewhere explained in the javadocs but I don't
> know where atm
>
> 2011/10/20 Bill Burke<bburke at redhat.com>:
>> Isn't the amount of workers fixed at bootstrap (at least for NIO)?
>>
>> On 10/20/11 3:46 AM, ljohnston wrote:
>>> Hi Irwin
>>>
>>> Those threads seem to come from the Eclipse runtime. Assuming your code
>>> isn't some sort of Eclipse plugin can you run it outside of eclipse and see
>>> if the behaviour changes? Otherwise it looks like something is spawning
>>> Eclipse jobs and Eclipse isn't releasing the threads.
>>>
>>> Cheers
>>> Lee
>>>
>>>
>>> --
>>> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Threads-New-Connections-tp6859861p6911955.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
>>
>> --
>> Bill Burke
>> JBoss, a division of Red Hat
>> http://bill.burkecentral.com
>> _______________________________________________
>> netty-users mailing list
>> netty-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/netty-users
>>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com


More information about the netty-users mailing list