Detailed difference between Java8 ForkJoinPool and Executors.newWorkStealingPool?

Work stealing is a technique used by modern thread-pools in order to decrease contention on the work queue. A classical threadpool has one queue, and each thread-pool-thread locks the queue, dequeue a task and then unlocks the queue. If the tasks are short and there are many of them, there is a lot of contention … Read more

In which thread do CompletableFuture’s completion handlers execute?

As @nullpointer points out, the documentation tells you what you need to know. However, the relevant text is surprisingly vague, and some of the comments (and answers) posted here seem to rely on assumptions that aren’t supported by the documentation. Thus, I think it’s worthwhile to pick it apart. Specifically, we should read this paragraph … Read more