dev@grizzly.java.net

Re: Custom ThreadPoolConfig is not applied

From: Ryan Lubke <ryan.lubke_at_oracle.com>
Date: Wed, 30 Nov 2011 21:44:09 -0800

Should be resolved in 2.1.x and master.

On 11/30/11 8:56 PM, Bongjae Chang wrote:
> Hi,
>
> When I set custom thread pool config as the following,
>
> ---
> transport.setWorkerThreadPoolConfig( myThreadPoolConfig );
> transport.setIOStrategy(…);
> ---
>
> Only default thread pool config would be set.
>
> This issue is related to the following change in AbstractTransport.java.
> ---
> Rev. 446b31b99adff917600ecf225dd6115859d47101
> "Update where the default worker thread pool configuration is obtained
> from. Previously, it was only done in the builder…"
> ---
>
> When I read the commit log, it seems to intend this behavior. Right?
> Perhaps, should a user always set IOStrategy first in order to use the
> custom thread pool config?
>
> Maybe it will work fine if I change the setting order like the following.
> ---
> transport.setIOStrategy(…);
> transport.setWorkerThreadPoolConfig( myThreadPoolConfig );
> ---
>
> Thanks.
>
> Regards,
> Bongjae Chang