September 2025
Intermediate to advanced
336 pages
11h 49m
English
Concurrency is dealing with a lot of things at once. Parallelism is doing a lot of things at once. —Rob Pike, from his Waza talk (https://go.dev/blog/waza-talk)
Concurrency may involve parallelism, but these two concepts are not the same. Concurrency is about structuring the code, whereas parallelism is about executing the code simultaneously.
Many goroutines can run concurrently on a single CPU through context switching, whereas parallelism may occur when multiple CPUs execute goroutines simultaneously. Grasping this distinction helps us structure concurrent code regardless of the number of available CPUs.
In this appendix, we’ll explore goroutines and channels. This appendix builds on concepts ...
Read now
Unlock full access