channel
A built-in Go language mechanism for communication and synchronization between goroutines. Channels act as typed conduits for passing data and come in two forms: unbuffered and buffered. They embody the CSP design philosophy of sharing memory through communication rather than sharing memory to communicate.
Timeline (last 90 days)
Go provides a set of built-in concurrency primitives through goroutines and channels.
Channels come in two varieties—unbuffered and buffered; a send operation on an unbuffered channel blocks until the receiver is ready, while a send on a buffered channel does not block as long as the buffer is not full.
The select statement can monitor multiple channels, implementing non-blocking operations when combined with default and timeout control when combined with time.After.
All Facts (3)
Go provides a set of built-in concurrency primitives through goroutines and channels.
50%UnverifiedChannels come in two varieties—unbuffered and buffered; a send operation on an unbuffered channel blocks until the receiver is ready, while a send on a buffered channel does not block as long as the buffer is not full.
50%UnverifiedThe select statement can monitor multiple channels, implementing non-blocking operations when combined with default and timeout control when combined with time.After.
50%