you should use `runBlocking`
# coroutines
j
you should use
runBlocking
👍🏼 1
d
I was afraid of that being deprecated, because of this https://github.com/Kotlin/kotlinx.coroutines/issues/227, bit I guess since there's no ui to change runBlocking uses and I just noticed that the default context in runBlocking is EmptyCoroutineContext, it's not the same as UI in the case of that issue... Right?
j
IntentService does not run on the UI thread. You're supposed to block on the thread where it delivers the callbacks.
Alternatively, don't use IntentService and use a normal Service and normal coroutine async/launch work.
d
Thanks for confirming! 👍🏼