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

Channels and channel operators #75

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

Channels and channel operators #75

KCreate opened this issue Mar 30, 2022 · 0 comments

Comments

@KCreate
Copy link
Owner

KCreate commented Mar 30, 2022

  • Channels can be passed to neatly pass values between fibers
  • Channels can be buffered or unbuffered
    • Unbuffered channels cause reading or writing fibers to block, waiting for another fiber to come around and complete the rendevouz
    • Buffered channels keep an internal queue but will block if the queue is full / empty
  • Channel operator <-
    • Can be used to read from a channel const value = <- channel
    • Can be used to write to a channel channel <- value
  • Channels can be used in the select operation described in Select statement to await multiple values #73
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