Implementing Parallelism
summary
TinyGo now runs goroutines in parallel on Linux, macOS and the RP2040 dual-core by mapping one goroutine to one OS thread, claiming simpler semantics at the cost of more RAM and context switches. It implements synchronization with futexes and a futex wrapper, refactors channels to use locks, changes garbage collection to stop-the-world via inter-core interrupts on bare metal, and uses a global lock for select to avoid deadlocks. RP2040 Mandelbrot rendering shows clear speedup; macOS may hit ~2000 thread limits.
AI-written summary · about
chapters (11)
- 0:00Introduction to parallelism and concurrency
- 1:28TinyGo multi-core support
- 3:38One thread per goroutine
- 5:07Parallelism changes in TinyGo
- 6:08What are futexes
- 9:19sync.Group with futexes
- 11:12Channels for parallelism
- 11:58Select without deadlocks
- 13:41Bare metal multi-core
- 15:51Demo on RP2040
- 17:20TinyGo parallelism future








