Join Slack
Powered by
<Coroutine IllegalStateException: Already resumed ...
# stackoverflow
u
user
03/22/2021, 11:01 AM
Coroutine IllegalStateException: Already resumed - not caught by runCatching [duplicate]
I'm wrapping callback styled code into a coroutine: suspend fun doSth() { val result = suspendCoroutine { continuation -> dataEmitter.setCallback( object : Callback { override fun onFun1() { continuation.resumeWith(...) } override fun onFun2() { continuation.resumeWith(...) } } ) dataEmitter.triggerEmit() } process(result)...
Open in Slack
Previous
Next