The threads in the ForkJoinPool are not released unless you call some flavor of shutdown(). The code sample in https://docs.scala-lang.org/overviews/parallel-collections/configuration.html is essentially leaking resources. This issue was discussed here as well: https://github.com/scala/bug/issues/11097 .