Is there a queue of pending tasks used in conjunction with Java 8's Executors.newWorkStealingPool()?
For example, suppose the # available cores is 2, and Executors.newWorkStealingPool() is empty because 2 tasks are already running. Then what happens if a 3rd task is submitted to the work-stealing executor? Is it queued? And if it is, what are the bounds if any on said queue?
Thanks in advance.
From grepcode of Executors and ForkJoinPool
Executors.newWorkStealingPoolreturnsForkJoinPoolExecutors:
ForkJoinPool:
On
execute():externalPushcallsexternalSubmitand you can seeWorkQueuedetails in that implementation.externalSubmit:
// External operations
You can find more details about queue sizes in
WorkQueueclassDocumentation on
WokrQueue: