Skip to content

when(first:cancelRemaining:) won't cancel synchronously if all inputs have cancelled #51

@lilyball

Description

@lilyball

From reading the code it appears that when(first: [Promise(with: .cancelled)]) returns a pending promise that will be cancelled asynchronously (on the .utility queue). We should fix this so it synchronously cancels if all inputs were already cancelled. This will make it consistent because it already fulfills/rejects synchronously if any input has been fulfilled/rejected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions