mirror of
https://github.com/ian-howell/go-concurrency-deep-dive.git
synced 2025-12-17 07:55:27 +00:00
A deep dive into go concurrency patterns
| .vscode | ||
| buffered-channels | ||
| channels | ||
| goroutines | ||
| select | ||
| symonks-stuff | ||
| waitgroups | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.md | ||
| slides.md | ||
Go Concurrency
This repository houses various golang concurrency pattern implementations. If you are new to concurrency in go, the optimal order to review the solutions is outlined below:
Patterns
- 01 - Goroutines
- 02 - WaitGroups
- 03 - Channels
- 05 - Fan In
- 06 - Restore Sequence
- 07 - Select Timeout
- 08 - Quit Signal
- 09 - Daisy Chain
- 10 - Google Search Synchronous
- 11 - Google Search Asynchronous
- 12 - Google Search Async Filtered
- 18 - Worker Pool
Pattern Overviews
Goroutines- A basic implementation of goroutines, running things asynchronously.Channels- A communication mechanism between goroutines, sharing memory by communicating.Fan In- Merging multiple goroutines results into a single channel for processing.Restore Sequence- Fan in with a twist, allowing order of fanned channel results to be controlled.Select Timeout- Giving a routine a period of time to finish else doing something else.Quit Signal- Signally to a goroutine that it is time to stop potentially early.Daisy Chain- Many goroutines, passing along messages like chinese whispers - confusing!Google Search Synchronous- A synchronous implementation of basic google searching.Google Search Asynchronous- Goroutines per search type and filtering in results.Google Search Asynchronous Filtered- Omitting results that took too long.- ...
Worker Pool- Fan out work to multiple works to complete in parallel.
Attribution notice
This repository was forked from symonk's repo. I intend to pretty heavily modify it to suit my own needs, but the original repo is proving to be a great starting point. Shout outs to symonk for laying out the base framework for this project!