#What is the difference between an unbuffered channel and a buffered channel of size one?
11 messages · Page 1 of 1 (latest)
If you try to write to an unbuffered channel, it'll block until someone reads it
If you write to a buffered channel it won't block unless the channel is full
So the first write will block in unbuffered
But the first write won't block in buffered of size 1
So if a goroutine tries to write into a channel that no one listens to, it will block until a consumer comes and reads from the channel?
Yes
Same with reads btw
If you try to read from an empty channel, it'll block until someone writes to it
correct..is there anything else to it?