Hacker News new | ask | show | jobs
by asymptotic 3791 days ago
When would you want to block as you insert tasks into an ExecutorService already executing N concurrent tasks? Why not use "newFixedThreadPool" and don't block but stil keep a maximum of N concurrent tasks? Honest question, not snarky.
1 comments

This can be used when you have limited resources like cpus and you want only a limited set of resource intensive tasks executing at any particular point of time..