- Refs: TDD, Go Chinese Doc
Channel to help organize and control the communication between the different processes, allowing us to avoid a race condition bug.
Go语言的并发模型是CSP(Communicating Sequential Processes),提倡通过通信共享内存而不是通过共享内存而实现通信。
Definition
Channel is a type of GO FUNDAMENTAL DATA STRUCTURE, that use to communicate with different Goroutine;
Usage
channel data structure is refs type;
Init
1 | // 1.var |