@edvin Maybe leverage the coroutines strategy for the thread pool? From the docs it looks like you launch a coroutine using a ForkJoinPool. When the threads join(), then you can close the app like in #507
https://kotlinlang.org/docs/tutorials/coroutines-basic-jvm.html