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

Select statement to await multiple values #73

Open
KCreate opened this issue Mar 30, 2022 · 0 comments
Open

Select statement to await multiple values #73

KCreate opened this issue Mar 30, 2022 · 0 comments

Comments

@KCreate
Copy link
Owner

KCreate commented Mar 30, 2022

  • Similar to what select does in Go
select {
  case fiber1 {
    // fiber1 finished first
  }
  case fiber2 => result {
    // fiber2 finished first
    // result contains the returned value of the fiber
  }
}
  • The concept can be extended to other future concurrency primitives like promises, channels or flags
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