This sample project provides some concurrency pattern examples in Go using Goroutines. There are three design patterns presented:
- The
waitgroupspattern. - The
multiple channelspattern. - The
worker poolpattern.
To execute the sample example cases you need:
Goinstalled on your machine- Change directory to the project's root directory:
cd .../go-concurrency-patterns - The commands for the different example cases are the following:
go run main.go -mode=waitgroupsgo run main.go -mode=channelsgo run main.go -mode=workerpool