2022-05-19
Java 8 Threads/Promises/CompletableFuture/ForkNodePool

Concurrency issues with Java software : useful links to troubleshoot

I am writing a new release of my Spring CQRS Module(link1, link2), including a parallel feature. issues can be hard to solve especially with new programming language features.

The issue with 8

However, I am encountering several issues with the 8 aka CompletableFutures.

My issues are :

  • I am using a dedicated ForkNodePool but some are stilled created outside my pool
  • Some threads are slow to die (WAITING state is too long)
  • Completable.allOf is creating promises in the common ForkNodePool
  • I had an exceeded waiting for thread exception

Here are two links that are helping me a lot to solve these problems :

These two articles are well documented and explain in detail how /Threads/Java/JVM/Promises and parallel streams work.

Next to read  Writing custom Cobol Rules with SonarQube

Sylvain Leroy

Senior Software Quality Manager and Solution Architect in Switzerland, I have previously created my own company, Tocea, in Software Quality Assurance. Now I am offering my knowledge and services in a small IT Consulting company : Byoskill and a website www.byoskill.com Currently living in Lausanne (CH)

View all posts by Sylvain Leroy →