In this blog, we are going to understand the internals of channels in Go.
Following are the things that I am covering in this blog.
- Overview and basic definition, types, use-cases and properties of channels.
- Making of channel, its representation
hchan struct, and initialisation.
- Different scenarios of blocking and unblocking of go-routines by channels .
- Exchange of messages between go-routines through channel, copying of data objects.
- Working of Pausing/Blocking and Resuming/Unblocking of go-routines by channels.
- Within it, brief introduction of runtime, scheduling, and
g, m, p structs
- Algorithm of pausing of sender on a full buffered channel (imp)
- Algorithm to…