Top "Channel" questions

A communication construct enabling sending of objects between execution threads.

Explain: Don't communicate by sharing memory; share memory by communicating

I wonder what is the most down to earth explanation of this famous quote: Don't communicate by sharing memory; share …

go memory channel goroutine
Using pointer to channel

Is it good practice to use pointer to channel? For example I read the data concurrently and pass those data …

go concurrency channel
For loop with buffered channel

I'm experimenting with Go channels and have an issue where the simple program below does not terminate. Essentially I want …

for-loop go channel buffered
golang: goroute with select doesn't stop unless I added a fmt.Print()

I tried the Go Tour exercise #71 If it is run like go run 71_hang.go ok, it works fine. However, …

select go channel goroutine
How does make(chan bool) behave differently from make(chan bool, 1)?

My question arises from trying to read a channel, if I can, or write it, if I can, using a …

go channel
Golang pause a loop in a goroutine with channels

I have a function that is launched as a goroutine: func (bt *BlinkyTape) finiteLoop(frames []Frame, repeat int, delay time.…

loops go channel pause
Multiple receivers on a single channel. Who gets the data?

Unbuffered channels block receivers until data is available on the channel. It's not clear to me how this blocking behaves …

go blocking channel
What's the difference between "<-chan" and "chan" as a function return type?

Golang newbie here. Is there a functional difference between func randomNumberGenerator() <-chan int { and func randomNumberGenerator() chan int { I've …

go channel
Do buffered channels maintain order?

In Go, do buffered channels have any order guarantee? For example: you have two goroutines A & B that share …

go channel