Join Slack
Powered by
I am not sure if this hasn't been already asked be...
# coroutines
l
littlelightcz
11/05/2018, 6:10 PM
I am not sure if this hasn't been already asked before, but can a deeply nested child coroutine call
cancel()
on the outermost parent's
Job
?
g
gildor
11/06/2018, 12:02 AM
Only if coroutine context contains Job from top level parent job
gildor
11/06/2018, 12:03 AM
It isn't always true, because some other closer parent could replace the job
gildor
11/06/2018, 12:04 AM
To do that just call coroutineContext.cancel(), you can check implementation of this extension
l
littlelightcz
11/06/2018, 8:08 PM
Thanks, I will check it out 🙂
littlelightcz
11/07/2018, 9:53 AM
Works great indeed! Thanks once again 😊
4
Views
Open in Slack
Previous
Next