typeover
curriculum

Curriculum Concurrency Channels exercise 7 · fill-line

Channels


About this theme

Channels are typed pipes between goroutines. ch <- v sends, v := <-ch receives. Unbuffered channels are a synchronisation primitive: send blocks until receive completes. Buffered channels decouple the two. Channel direction (<-chan T, chan<- T) is part of the type signature.