Add Promise.makeChild()
lilyball opened this issue · comments
Lily Ballard commented
When using Promise.propagatingCancellation(on:cancelRequested:)
the client should always hand a child back to its caller. Right now the best way of producing a child looks like .then(on: .immediate, { _ in })
which is ugly and not necessarily obvious. We can add a .makeChild()
method which produces a child that participates in automatic cancellation propagation, and then document this convenience on Promise.propagatingCancellation(on:cancelRequested:)
.