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

Prevent request-racing in futures wrapper #2

Open
udoprog opened this issue Jul 19, 2019 · 0 comments
Open

Prevent request-racing in futures wrapper #2

udoprog opened this issue Jul 19, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@udoprog
Copy link
Owner

udoprog commented Jul 19, 2019

Currently any asynchronous request that enters wrap will race against each other, causing more requests than needed to go through.

Instead, do:

  • Only one request for a given unique key may be pending at a time, the other futures should queue up.
  • If that one request fails, all queued up futures should be marked as failed with the same error (this might be an issue if the error is not Clone). Alternatively, we provide our own error variant for this case.
@udoprog udoprog added the enhancement New feature or request label Jul 19, 2019
udoprog added a commit that referenced this issue Jul 20, 2019
udoprog added a commit that referenced this issue Jul 20, 2019
udoprog added a commit that referenced this issue Jul 20, 2019
udoprog added a commit that referenced this issue Jul 20, 2019
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