You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a great idea! I could see cases where you might not want this behavior, but it makes sense that the default should probably be to reset child task state too.
Let's say parent is cancelled while awaiting child2; is the idea that child1 (in additional to child2) would have its state reset because it was previously performed by child1?
I can imagine some trickiness in the mental model and potentially how we implement this if, say, other tasks might be calling child1 directly; and we might not be able to say this is a backwards-compatible change.
I can imagine some trickiness in the mental model and potentially how we implement this if, say, other tasks might be calling child1 directly; and we might not be able to say this is a backwards-compatible change.
agreed. it's definitely a change that would have to come under a toggle of some sort or next major release. would also add that it might make sense to have it entangled w/ linked() vs unlinked() on it too (i.e. unlinked() shouldn't trigger that behavior), but also there should be an opt-out at the cancelAll level too (e.g. cancelAll({ resetState: true, skipChildren: true }) or something
It seems that there isn't an option to reset the state of child tasks when canceling a parent task.
Assuming I have a
parent
andchild
task like this:I can reset the state of the parent task when canceling it by passing
{ resetState: true }
option:But that option does not seem to propagate to cancellation of the child task.
As a work-a-round I need to cancel the child task manually and pass the
{ resetState: true }
option to it as well:It would be great if I the
resetState
option propagates to all child tasks instead. Maybe controlled by another option forcancelAll
.The text was updated successfully, but these errors were encountered: