taer
04/23/2020, 11:11 PMinstanceScope
)spawn
call in the system I'm converting is expected to block untill the work is done. Side question though. What couroutingScope
is the this
inside that runBlocking? The
for (x in streamer)
call is a suspending call, so I'm curious what scope is managing that callaraqnid
04/23/2020, 11:19 PMtaer
04/23/2020, 11:19 PMaraqnid
04/23/2020, 11:19 PMrunBlocking(instanceScope) { … }
runBlocking(instanceScope.context)
taer
04/23/2020, 11:20 PMaraqnid
04/23/2020, 11:21 PMinstanceJob : Job
and pass context + instanceJob
as the parameter to runBlocking
taer
04/23/2020, 11:22 PMaraqnid
04/23/2020, 11:22 PMtaer
04/23/2020, 11:23 PMcontext + Job()
araqnid
04/23/2020, 11:23 PMCoroutineScope(..)
didn’t create one, as opposed to coroutineScope { }
taer
04/23/2020, 11:24 PMContextScope(if (context[Job] != null) context else context + Job())
araqnid
04/23/2020, 11:26 PMtaer
04/23/2020, 11:27 PM