Channels pass typed values between goroutines. Unbuffered channels synchronise sender and receiver; buffered ones decouple them up to capacity. Closing signals completion to receivers, and receiving from a closed channel yields the zero value with ok=false.
← Go theorytheory 0/50 · 0%
Concurrency · medium
22. Channels
Typed pipes for communication.
Check your understanding
1. An unbuffered send blocks until…
2. Who should close a channel?