Optimizing Netty for fast socket accept/creation

"이희승 (Trustin Lee)" trustin at gmail.com
Thu Jul 9 14:42:39 EDT 2009


On 07/10/2009 12:32 AM, Carl Byström wrote:
> Hi again!
> 
> On Wed, Jul 8, 2009 at 9:47 AM, "이희승 (Trustin Lee)"
> <trustin at gmail.com <mailto:trustin at gmail.com>> wrote:
> 
> 
>     I increased the number of acceptor threads like the following:
> 
>        for (int i = 0; i < 2; i ++) {
>            bossExecutor.execute(new IoWorkerRunnable(
>                    new ThreadRenamingRunnable(
>                            new Boss(channel),
>                            "New I/O server boss #" + id + '-' + i +
>                            " (channelId: " + channel.getId() +
>                            ", " + channel.getLocalAddress() + ')')));
>        }
> 
> 
> Did I miss something obvious here? But how would I make two threads
> (processes) bind to the same address?

Bind operation is done only once before calling .execute().  It just
increases the number of threads that calls .accept().

Trustin



More information about the netty-users mailing list