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

Justin Tullgren

07/21/2020, 2:55 PM
Hi. Should
suspendCancellableCoroutine
being called in a
runBlocking
or
runBlockingTest
context and using the same dispatcher (Test Dispatcher) block while waiting for a java callback that it wraps? The API that
suspendCancellableCoroutine
wraps spawns a Java thread.
Here is an issue that explains in more detail: https://github.com/Kotlin/kotlinx.coroutines/issues/2152
4 Views