# Anonymous CompletableFuture threads with burstable pods

DevFeed: [Anonymous CompletableFuture threads with burstable pods](<https://devfeed.tech/articles/anonymous-completablefuture-threads-with-burstable-pods-26081.md>)

Original publisher: [Read original article](<https://blog.arkey.fr/2020/12/11/completablefuture-with-burstable-pods/>)

Author: brice.dutheil@gmail.com (Brice Dutheil)

Published: 2020-12-11T13:05:00Z

Content type: article

Language: en

Sources: [The Coffee Workshop](<https://devfeed.tech/sources/the-coffee-workshop.md>)

Topics: [threadpools](<https://devfeed.tech/topics/threadpools.md>), [multithreading](<https://devfeed.tech/topics/multithreading.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [JDK Flight Recorder](<https://devfeed.tech/topics/jdk-flight-recorder.md>)

Tags: [completablefuture](<https://devfeed.tech/tags/completablefuture.md>), [container](<https://devfeed.tech/tags/container.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [threads](<https://devfeed.tech/tags/threads.md>)

## AI overview

A JFR recording showed many short-lived anonymous threads, whose allocation events helped trace them to CompletableFuture tasks using the default ForkJoinPool. The excerpt says that when the JVM sees no more than one processor, the pool may create a new thread for each task; a Kubernetes CPU setting of two is mentioned, but the excerpt does not establish what processor count the JVM saw in that case. It identifies two possible fixes: pass an executor to the code or configure the default pool's parallelism. The text ends before detailing the configuration method.

## Source excerpt

It all started when opening a JFR recording, I noticed a very large and growing number of very short lived threads.