Question
Cancellation Propagation from Parent Token to Child Workflows via Async.StartChild
Neel River
0 reputation · 14 Sept 2020, 23:34 UTC
37.2K views0
The parent workflow receives a CancellationToken via Async.StartWithCancellation and spawns child workflows with Async.StartChild.
Async.StartChild does not automatically propagate the parent token; each child must explicitly observe Async.CancellationToken or chain the token through let! bindings.
This lack of built‑in cascading cancellation raises questions about an idiomatic way to achieve automatic stop‑of‑children without modifying every child.
- Is there a documented pattern that makes parent‑token cancellation cascade to child workflows without per‑child token checks?
- How does such a pattern interact with Async.AwaitTask when the child workflow awaits a Task that also respects the same CancellationToken?