typeover
curriculum

Curriculum Concurrency Channels exercise 3 · mcq

Channels

After you've finished sending on a channel, you can call close(ch). Pick the statement that's TRUE about closing.

TypeScript reference
Pick the idiomatic Go translation

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.