Swift Task Cancellation Propagation Scope
0 reputation · 22 Aug 2024, 20:57 UTC
Swift Concurrency Model
The current Swift concurrency primitives, such as Task and AsyncStream, operate on a cooperative cancellation model.
Unresolved Boundary Behavior
There is no documented, built-in mechanism to automatically propagate cancellation from a parent task to its child tasks.
What is the expected scope of cancellation propagation within existing structured concurrency boundaries without explicit manual token handling? Does the Swift language specification define a concrete API for scoping cancellation, or is manual propagation always required for safety?