Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lilyball opened this issue Nov 22, 2018 · 1 comment
Closed

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

lilyball opened this issue Nov 22, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@lilyball
Copy link
Owner

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.

@lilyball lilyball added the enhancement New feature or request label Nov 22, 2018
@lilyball lilyball added this to the Next milestone Nov 22, 2018
@lilyball lilyball self-assigned this Nov 22, 2018
@lilyball
Copy link
Owner Author

@julasamer This is now implemented on master, so you can start using it in place of Promise(fulfilled: ()).delay(1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant