← Concurrency In Go

Chapter-2(Modeling your code: communicating sequential processes)

GolangCSP

What is CSP?

CSP stands for communicating sequential processes.
Which is both a technique and the name of the paper that introduced it. In 1978, Charles Antony Richard Hoare published the paper in the Association for Computing Machinery (more popularly referred to as ACM).
Combined with Edgar Dijkstra's guarded command.

A guarded command is simply a statement with a left- and righthand side, split by a →. The lefthand side served as a conditional, or guard for the righthand side in that if the lefthand side was false or, in the case of a command, returned false or had exited, the righthand side would never be executed.
GO channel born from combining those two concepts.

Note

Do not communicate by sharing memory. Instead, share memory by communicating.
Go’s philosophy on concurrency can be summed up like this: aim for simplicity, use channels when possible, and treat goroutines like a free resource.