Executors enhancement

Christian Schulte cs at schulte.it
Sun Aug 7 22:51:01 UTC 2016


Hello,

whenever I need to update an existing codebase to add some kind of
parallelization, I am in the need of an executor matching the number of
processors available at runtime. Most of the time I end up using
something like:

'Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors())'

If every library used by an application needs to maintain its' own
executors the application ends up with starting number of libraries used
times number of available processors threads. That does not scale. I
think there really is a need for some kind of default executor provided
by the platform. I am suprised I cannot find anything like that
anywhere. I would like to request an enhancement providing such a
default platform executor everyone can use to add parallelization
without ending up with tons of threads when all you want is making use
of the system's parallelization capabilities.

Regards,
-- 
Christian


More information about the core-libs-dev mailing list