Optimizing Gpars thread pool

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Optimizing Gpars thread pool

Paolo Di Tommaso
I've noticed that Gpars creates three different  thread pools. At these lines: 
I was wondering if this is really required and if these components could share the same thread pool. 

I made a test  creating a thread pool factory returning always the same (fixed size) thread pool instance. It seems working fine. 

The benefits of this approach would be to reduce the total number of actual threads in the application, that at the end would be useless. 

But I'm not sure if this could introduce some nasty side-effect. Is it safe to reuse the same thread pool in your opinion?