Go theorytheory 0/50 · 0%
Concurrency · medium

22. Channels

Typed pipes for communication.

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.

Check your understanding

  1. 1. An unbuffered send blocks until…

  2. 2. Who should close a channel?