https://kotlinlang.org logo
Title
l

lupajz

01/27/2020, 10:29 PM
I have a quick question, or more like looking for insight from somebody: I have a ConflatedBroadcastChannel to which I open multiple subscribers each separately as a new Job within parent scope like:
parentScope.launch { sub.consumeEach { ... } } 
parentScope.launch { sub.consumeEach { ... } } 
parentScope.launch(NonCancellable) { sub.consumeEach { ... } }
Now the last one job has extra NonCancellable context, am I correct to assume that the last subscriber won't closed if I would cancel the parentScope ?
o

octylFractal

01/27/2020, 10:35 PM
yes, but be aware it won't delay the parentScope's Job from joining