I want to cancel all old jobs in a CoroutineScope ...
# coroutines
a
I want to cancel all old jobs in a CoroutineScope and start a new job in the same CoroutineScope. What’s the best way to do that?
k
If you apply structured concurrency, I guess you could simply do
cancelAndWait
on scope and then reuse it
🚫 1
a
Ok
t
I think you're looking for
cancelChildren
.
☝️ 3