rocketraman
01/05/2019, 3:19 PMwithContext
that never completes. If I remove the withContext
it does run to completion. The problem seems to be my use inside the withContext
block of async(SupervisorJob(coroutineContext[Job])) { ... }
as described in https://github.com/Kotlin/kotlinx.coroutines/issues/763 -- if I change the call to be a straight async
call, then it works fine. Either this is a bug, or I'm not understanding something...withContext(IO + SupervisorJob(coroutineContext[Job])) { ... }
with regular async
calls inside the block also hangs.DebugProbes.printScope(this)
shows a bunch of active SupervisorJobImpl
. I'm not sure why these would be still be active... the underlying async calls have been awaited and values retrieved with no issues.louiscad
01/06/2019, 12:17 AMcoroutineScope { ... }
wrapping the async
calls that may fail recoverably, and handle the throwables outside of the local coroutineScope { ... }
rocketraman
01/06/2019, 12:22 AMlouiscad
01/06/2019, 12:30 AMrocketraman
01/07/2019, 2:05 PMlouiscad
01/07/2019, 6:01 PMcoroutineScope
instead.