-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Also cancel remaining promises #4
Comments
I'm not sure I want to continue adding support for the |
I suppose that the 2 could actually just be combined here, without extending new pRace([
signal => fetch('/api', {signal}),
signal => setTimeout(10, {signal}),
]) |
Or new pRace(signal => [
fetch('/api', {signal}),
setTimeout(10, {signal}),
]) |
Also shortcuttable to: new pRace([
[fetch, '/api'],
[setTimeout, 10],
]) But this has a few drawbacks and some errors would be silent |
I like this one. |
It kind of irks me that the default for races is to just let everything continue even when the race ended.
What do you think about also calling
.cancel
to the promises that are running?The text was updated successfully, but these errors were encountered: