← BYTES
Go·Starter·Ref: 10.1.12
What is a channel used for, at the simplest level?
Have a question about this video? Mention reference 10.1.12 when you contact us.
a.Sending and receiving typed values safely between goroutines
b.Storing a fixed-size array of bytes on disk
c.Declaring a new package-level constant
d.Formatting strings for printing, like fmt.Sprintf
A channel (declared with chan T) is Go's built-in mechanism for goroutines to communicate by passing values back and forth, rather than communicating purely by sharing memory protected with locks -- the language's own slogan for this is 'share memory by communicating'.
Find this on YouTube & Instagram
Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:
#BYTES#BYTES10112#Go