bdawg.io
11/20/2018, 9:46 PMval rootJob = Job()
val rootContext = Dispatchers.Default + rootJob
val otherJob = Job()
val otherScope = object : CoroutineScope {
override val coroutineContext = rootContext + otherJob
}
otherScope.doSomethingAsync()
otherScope.doSomethingElseAsync()
rootJob.cancel() // will this cancel items from otherJob?
Dico
11/20/2018, 9:51 PMrootContext + otherJob
, where the value associated with [Job]
key is simply dropped.bdawg.io
11/20/2018, 9:55 PM[Job]
is present and passing it as the parent
of the otherJob
? If I do that, will otherJob
being cancelled cause the rootJob
to cancel too (undesirably in my case)?gildor
11/21/2018, 3:20 AM