https://kotlinlang.org logo
#coroutines
Title
# coroutines
x

xenoterracide

09/27/2019, 10:01 PM
coroutines on the jvm, is there some kind of underlying executor service that can be grabbed?
o

octylFractal

09/27/2019, 10:04 PM
depends on the dispatcher, you can try casting the
ContinuationInterceptor
to `ExecutorCoroutineDispatcher`: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-executor-coroutine-dispatcher/index.html
examples of dispatchers that probably don't have one are any
Main
dispatcher, which runs on an existing UI thread, and
Unconfined
, which doesn't manage threads
x

xenoterracide

09/27/2019, 10:08 PM
thanks
4 Views