Worker threads in NioServerSocketChannelFactory vs. ExecutionHandler
Ersin Er
ersin.er at gmail.com
Sat Jun 18 17:31:28 EDT 2011
One more related question:
Considering the following constructor:
public NioServerSocketChannelFactory(
Executor bossExecutor, Executor workerExecutor,
int workerCount)
How is workerCount ad workerExecutor (and its pool size) related? Isn't the
number of I/O worker threads fixed by the workerExecutor? What happens if I
pass a Executors.newFixedThreadPool(8) as workerThreads to this constructor?
Thanks again,
On Sun, Jun 19, 2011 at 00:03, Ersin Er <ersin.er at gmail.com> wrote:
> Well, I guess I could not ask the question the right way. Actually by
> digging more into documentation and source code I think I understood the
> difference. Anyway let me restate what I understood:
>
> There are two types of "worker" thread pools in Netty. First one (set in NioServerSocketChannelFactory
> constructor ) is responsible for doing I/O operations and the second one
> (added as a handler to the pipeline, namely ExecutionHandler) is responsible
> for application logic. Right?
>
> Thanks.
>
> On Sat, Jun 18, 2011 at 17:52, "이희승 (Trustin Lee)" <trustin at gmail.com>wrote:
>
>> The first one is used for boss threads and the second one is for worker
>> threads. A worker thread performs actual reads and writes. A boss thread
>> accepts a new incoming connection or makes a new connection attempt. Once a
>> new connection is accepted or a connection attempt succeeds, the new channel
>> is handed off to one of the worker threads. For now, there's no way to set
>> the boss thread count.
>>
>> HTH
>> _______________________________________________
>> netty-users mailing list
>> netty-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/netty-users
>>
>
>
>
> --
> Ersin Er
>
--
Ersin Er
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20110619/6ba6046d/attachment.html
More information about the netty-users
mailing list