<Coroutine IllegalStateException: Already resumed ...
# stackoverflow
u
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)...