logo dotConferences

Behavior Of Channels

William Kennedy at dotGo 2017

Bill learned over time that it’s best to forget about how channels are structured and focus on how they behave. So now when it comes to channels, he thinks about one thing: signaling.

A channel allows one goroutine to signal another goroutine about a particular event. Signaling is at the core of everything you should be doing with channels.

Thinking of channels as a signaling mechanism will allow you to write better code with well defined and more precise behavior.