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

Do not cancel remaining promises #4

Closed
clue opened this issue Jun 6, 2015 · 3 comments
Closed

Do not cancel remaining promises #4

clue opened this issue Jun 6, 2015 · 3 comments

Comments

@clue
Copy link
Owner

clue commented Jun 6, 2015

Right now, every await*() method cancels any remaining promises. This is debatable, but IMHO the "await" implies that we either wait for the promises to settle or will never care about their (possible) future results.

Arguably, another use case would be "checking" whether a promises settles within a given time frame. I'd like to put this out here to see if anybody happens to have any thoughts and/or actual use cases.

@clue
Copy link
Owner Author

clue commented Jul 2, 2015

I think these are actually two independent use cases that should be clearly separated.

As such, I'd vote against a boolean flag (boolean trap?) and vote for two distinct methods similar to this:

awaitRace($promises, $loop);
awaitRaceOrCancel($promises, $loop);

The default should probably to not cancel any promises, as this is the default promise behavior (e.g. Promise\all()). (Warning, BC break ahead).

Also refs #5.

@clue
Copy link
Owner Author

clue commented Jul 11, 2015

I'll postpone this ticket until we find a valid use case for non-cancellation behavior.

This might be relevant again once #14 is being implemented: Should we cancel every promise once we run into a timeout?

@ALL: If you happen to have a use case, please update this ticket.

@clue
Copy link
Owner Author

clue commented Mar 9, 2016

I'll postpone this ticket until we find a valid use case for non-cancellation behavior.

Given we have yet to find a use-case for this, I'll close this for now. Feel free to comment and I'm happy to reconsider.

@clue clue closed this as completed Mar 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant