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 "Race" functionality #1

Open
aamironline opened this issue Apr 20, 2021 · 0 comments
Open

Add "Race" functionality #1

aamironline opened this issue Apr 20, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@aamironline
Copy link
Member

This will allow user to start multiple go routine with similar with the intension to consider the result from the first go routine that has finished the task.

// GoR (Go Race) will allow will launch multiple go routines, but the result will
// be fetched from the first finished go routine!
result, err := async.GoR(fetchResource, cachedResource).Await()
if err != nil {
  log.Fatal(err)
}
@aamironline aamironline added the enhancement New feature or request label Apr 20, 2021
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