A deep dive into go concurrency patterns
Find a file
2025-03-26 22:22:45 +00:00
.vscode pipelining improvements 2024-07-20 10:41:57 +01:00
buffered-channels Add buffered channel example 2025-03-26 01:47:15 +00:00
channels Add an image for unbuffered channels 2025-03-24 19:03:16 -05:00
goroutines Clean up the intro example 2025-03-07 13:57:58 +00:00
select Add more detail to the select example 2025-03-25 23:44:38 +00:00
symonks-stuff Fix some nits in the original code 2025-03-24 22:48:26 -05:00
waitgroups tiny tweak to waitgroups example 2025-03-07 14:46:52 +00:00
.gitignore Initial commit 2024-07-20 09:39:07 +01:00
go.mod remove dependencies 2024-07-20 16:58:38 +01:00
go.sum remove dependencies 2024-07-20 16:58:38 +01:00
LICENSE Initial commit 2024-07-20 09:39:07 +01:00
README.md Clean up readme 2025-03-24 19:02:54 -05:00
slides.md Finish raffle stuff 2025-03-26 22:22:45 +00:00

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


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!