Hi! Does anyone know how to stop the threads start...
# coroutines
r
Hi! Does anyone know how to stop the threads started by the
CoroutineScheduler
? I'm trying to use coroutines from a webapp, where kotlin is loaded by the webapp classloader, so I need to cleanup all resources that I allocated. For this I have my own
ExecutorCoroutineDispatcher
that is used trough the code based on a internal
ScheduledThreadPoolExecutor
. But this seems to still startup some default thread pools...
s
Shouldn’t calling
shutDown()
or
shutDownNow()
on your
ScheduledThreadPoolExecutor
do the proper clean-up?
r
I do that, and the threads in the backing
ScheduledThreadPoolExecutor
are cleaned correctly, but the container still reports that Worker threads are alive, spawned by
CoroutineScheduler