Skip to content

Add Promise(fulfilled:after:) and Promise(rejected:after:) #27

@lilyball

Description

@lilyball

We should have constructors Promise(fulfilled:after:), Promise(rejected:after:), and Promise(result:after:) that resolve after the given delay. This is distinct from e.g. Promise(fulfilled: foo).delay(3) in the way cancels are handled. With delay, if the upstream promise doesn't cancel (which Promise(fulfilled:) never will) then the delayed promise won't either. But with Promise(fulfilled:after:), requesting cancellation prior to the promise resolving will immediately cancel it.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions