Skip to content

Add Promise.makeChild() #56

@lilyball

Description

@lilyball

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:).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions