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

ritesh

08/13/2021, 8:31 PM
Is there a difference between
coroutineScope.coroutineContext.cancelChildren
vs
coroutineScope.cancel
They both cancels all the childrens.
d

Dominaezzz

08/13/2021, 8:39 PM
The latter cancels itself too. So no new children allowed.
r

ritesh

08/13/2021, 8:43 PM
Yes, thanks @Dominaezzz - Should have read java doc of the function carefully!, without focusing more on it cancels all the children of the job.
2 Views