Christian,

A number of years ago I put together two small libraries to provide access to 
Apple's Grand Central Dispatch from Java. My thought was precisely to play 
nicely with the host operating system, power management etc. I've often thought 
something similar to fork-join's common pool that each platform implements with 
the best native alternative would be a good platform addition, but I've not 
developed the idea any further. 

http://pixel.recoil.org/code/rococoa/

Andrew 

> On Aug 7, 2016, at 3:51 PM, Christian Schulte <c...@schulte.it> wrote:
> 
> 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

Reply via email to