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 the race function #7

Closed
rcardin opened this issue Jun 3, 2024 · 0 comments · Fixed by #16
Closed

Add the race function #7

rcardin opened this issue Jun 3, 2024 · 0 comments · Fixed by #16
Labels
enhancement New feature or request
Milestone

Comments

@rcardin
Copy link
Owner

rcardin commented Jun 3, 2024

Racing two suspendable functions, foo and bar, should have the following semantics:

  1. If foo completes, then return the foo result and cancel the bar execution;
  2. If bar completes, then return the bar result and cancel the foo execution;
  3. If one of the two functions fails at first, wait for the result of the other. If it's an error, return an error (containing both errors?), and return the second result otherwise.
@rcardin rcardin added the enhancement New feature or request label Jun 3, 2024
@rcardin rcardin added this to the v0.0.3 milestone Jun 3, 2024
@rcardin rcardin linked a pull request Jun 14, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant