Default threads based on processoes/cores for executor service.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Default threads based on processoes/cores for executor service.

agentgt
The atmosphere doc often says:
 
"As
 with
 the
 ExecutorService,
 the
 number
 of
 OS’
 core/processor

will
 be
 used
 to
 determine
 the

default
 number
 of
 threads.
"

Interested on how you were detecting the default number of threads in
the pool I checked the code. But after inspecting the code the default
appears to be always be a single threaded ExecutorService in
BroadcasterConfig.

The only thing that might be "auto detecting of thread pool" is the
async write service:

        asyncWriteService = Executors.newCachedThreadPool(new
ThreadFactory() {

But I don't new cached thread pool does any magic detection of
cores/processors.

Is this just a doc bug?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[[atmosphere-users]] Re: Default threads based on processoes/cores for executor service.

Jeanfrancois Arcand-4
Salut,

this is a doc bugs. Please file an issue here

http://java.net/jira/secure/CreateIssue!default.jspa

Thanks

-- Jeanfrancois

On 11-09-14 11:50 AM, [hidden email] wrote:

> The atmosphere doc often says:
>
> "As
 with
 the
 ExecutorService,
 the
 number
 of
 OS’
 core/processor

> will
 be
 used
 to
 determine
 the

> default
 number
 of
 threads.
"
>
> Interested on how you were detecting the default number of threads in
> the pool I checked the code. But after inspecting the code the default
> appears to be always be a single threaded ExecutorService in
> BroadcasterConfig.
>
> The only thing that might be "auto detecting of thread pool" is the
> async write service:
>
> asyncWriteService = Executors.newCachedThreadPool(new
> ThreadFactory() {
>
> But I don't new cached thread pool does any magic detection of
> cores/processors.
>
> Is this just a doc bug?
Loading...