Building a Coroutine based Job System without Standard Library
summary
Builds a coroutine-based job system using only C++20 language coroutines (no stdlib), a custom token/promise pair, a token dispatcher as initial_suspend, and a scheduler that enqueues lightweight jobs; uses a custom future plus a single-consumer event on Windows and MSVC for debugging. Demo runs a vaccine-sim with five labs (one finds vaccine that round) and prints per-second stats (~3,000 healthy initially). Shows lower allocation and removed bookkeeping, supports lazy jobs via deferred token, but profiler, thread-local assumptions, and tooling remain problematic.
AI-written summary · about
chapters (14)
- 0:00Introduction and background
- 1:12C++20 coroutines recap
- 10:02Coroutine mechanics deep dive
- 12:54Job system overview
- 17:33Token promise implementation
- 22:16Returning results from coroutines
- 24:49Sequential job execution
- 28:29Parallel job composition
- 30:35Lazy job scheduling
- 32:03Coroutine lifetime management
- 36:05System benefits and improvements
- 38:09Challenges and limitations
- 40:42Production readiness and learning curve
- 41:04Q&A session
related talks
01h 01mGame engine using STD C++ 11
57mOptimising Data Building In Game Development
01h 04mParallel Game Engine Design
39mA revolution is coming! Writing performant and safe multi threaded code in Unity
52mBuilding more efficient locks
01h 01mOptimally Shooting Furry Balls out of Vulkanoes
59mThe path to leveraging DOTS in production
01h 18mThis Videogame Developer Used the STL and You'll Never Guess What Happened
