A thread pool
Queues, mutexes and condvars. Spread work across threads without data races, and measure it properly.
Build it in your language
The tester treats your program as a black box: any language works. These are just the most convenient ones for this project.
What this project is about
You learn concurrency badly by reading: you have to watch it fail. This challenge is built so you watch it fail in a controlled setting and learn to fix it with the right tools.
You'll build a reusable thread pool, from the naive one-mutex version to one with work stealing, orderly shutdown and error propagation. And you'll measure every version, because in concurrency intuition lies.
Roadmap
8 stages across 4 phases. Every stage comes with its guide and its tests: you move on when they pass.
- Phase 12 stages
Work in parallel
Spawn threads, hand out tasks through a queue, and watch the first race appear.
- Phase 23 stages
Synchronising properly
Mutexes, condition variables, and workers that wait without burning CPU.
- Phase 32 stages
A usable pool
Tasks with results, propagated errors, and orderly shutdown.
- Phase 41 stage
Performance
Local queues, work stealing, and measuring contention.