<div>If there is no open connection assigned to a worker thread, the thread will be returned to the thread pool after a while. &nbsp;Sometimes, when a worker thread is being returned to the pool and another thread is being pulled again because of a new connection, the number of the threads borrowed from the pool will exceed the maximum number of worker threads. &nbsp;However, this happens only briefly, and that's why you have to use newCachedThreadPool(). &nbsp;If you specified the number of worker threads as 4 and specified a fixed thread pool with 4 threads, it will be locked up because sometimes Netty will need 5 threads, although it never means I/O will take place in more than 4 threads.<br></div>
                <div><br>--&nbsp;<br>Trustin Lee<br>Sent with <a href="http://www.sparrowmailapp.com/?sig">Sparrow</a><br></div>
                 
                <p style="color: #A0A0A8;">On Thursday, October 20, 2011 at 7:08 AM, Norman Maurer wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div>Maybe I don't remember correctly. I will have a deeper look again.<br><br>Thanks,<br>Norman<br><br>Am Donnerstag, 20. Oktober 2011 schrieb Bill Burke &lt;<a href="mailto:bburke@redhat.com">bburke@redhat.com</a>&gt;:<br>
&gt; I don't think you are right. &nbsp;I've been looking at the NIO code deeply<br>&gt; the past few days and the set of workers is a fixed array[]. &nbsp;The accept<br>&gt; thread does a register on a round-robin-picked worker. &nbsp;If the worker is<br>
&gt; already started, then the accepted socket is added to the worker's<br>&gt; selector. &nbsp;If the worker isn't started, then it gets added to the worker<br>&gt; Executor.<br>&gt;<br>&gt; OiO is different though and *does* do a thread-per-connection.<br>
&gt;<br>&gt; On 10/20/11 9:36 AM, Norman Maurer wrote:<br>&gt;&gt; Hi Bill,<br>&gt;&gt;<br>&gt;&gt; the "max" cocurrent io threads are limited thats right. But it may<br>&gt;&gt; spin a new thread for some reasons before one can get destroyed or put<br>
&gt;&gt; back..<br>&gt;&gt;<br>&gt;&gt; See also:<br>&gt;&gt; <a href="http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Help-with-limiting-number-of-possible-channels-td6464491.html#none">http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Help-with-limiting-number-of-possible-channels-td6464491.html#none</a><br>
&gt;&gt;<br>&gt;&gt; Bye,<br>&gt;&gt; Norman<br>&gt;&gt;<br>&gt;&gt; Ps: I think its also somewhere explained in the javadocs but I don't<br>&gt;&gt; know where atm<br>&gt;&gt;<br>&gt;&gt; 2011/10/20 Bill Burke&lt;<a href="mailto:bburke@redhat.com">bburke@redhat.com</a>&gt;:<br>
&gt;&gt;&gt; Isn't the amount of workers fixed at bootstrap (at least for NIO)?<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; On 10/20/11 3:46 AM, ljohnston wrote:<br>&gt;&gt;&gt;&gt; Hi Irwin<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; Those threads seem to come from the Eclipse runtime. Assuming your code<br>
&gt;&gt;&gt;&gt; isn't some sort of Eclipse plugin can you run it outside of eclipse and see<br>&gt;&gt;&gt;&gt; if the behaviour changes? Otherwise it looks like something is spawning<br>&gt;&gt;&gt;&gt; Eclipse jobs and Eclipse isn't releasing the threads.<br>
&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; Cheers<br>&gt;&gt;&gt;&gt; Lee<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; --<br>&gt;&gt;&gt;&gt; View this message in context: <a href="http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Threads-New-Connections-tp6859861p6911955.html">http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Threads-New-Connections-tp6859861p6911955.html</a><br>
&gt;&gt;&gt;&gt; Sent from the Netty User Group mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>&gt;&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt;&gt; netty-users mailing list<br>&gt;&gt;&gt;&gt; <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
&gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>&gt;&gt;&gt;<br>&gt;&gt;&gt; --<br>&gt;&gt;&gt; Bill Burke<br>&gt;&gt;&gt; JBoss, a division of Red Hat<br>
&gt;&gt;&gt; <a href="http://bill.burkecentral.com">http://bill.burkecentral.com</a><br>&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt; netty-users mailing list<br>&gt;&gt;&gt; <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>&gt;&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; netty-users mailing list<br>
&gt;&gt; <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
&gt;<br>&gt; --<br>&gt; Bill Burke<br>&gt; JBoss, a division of Red Hat<br>&gt; <a href="http://bill.burkecentral.com">http://bill.burkecentral.com</a><br>&gt; _______________________________________________<br>&gt; netty-users mailing list<br>
&gt; <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>&gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>&gt;
</div><div>_______________________________________________<br>netty-users mailing list<br><a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a><br></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>