Combining Co-Routines and Functions into a Job System
summary
Claims a working C++20 job system called Vienna Game Job System (VGJS) that schedules both co-routines and plain functions, supports tagged phase scheduling, memory_resource allocation, and Chrome trace output. Built as a thread‑pool only system with work stealing and per‑thread local queues. Measured minimum useful job sizes around 4–8 microseconds for 85–95% efficiency on 12/24 threads. Co‑routines run faster when their frames are preallocated but incur significant overhead when frequently allocated and destroyed.
AI-written summary · about
chapters (27)
- 0:00Introduction
- 0:33About me
- 1:37Game Engine
- 2:16Game Loop
- 2:47Game State
- 3:34Multicores
- 5:20One Thread
- 6:13Parallelization
- 7:25Thread Pool
- 9:25Dependencies
- 12:16Thread Pull
- 13:29Local Cues
- 14:21Phases
- 15:42Vienna Game Job System
- 18:46Scheduling
- 22:08Scheduling jobs
- 23:32Coroutines
- 28:11Example
- 30:35Behind the Scenes
- 33:57The Triangle of Classes
- 36:25Promise API
- 39:35Waiters
- 42:52Waiters for Functions
- 47:00CoAwaiting
- 50:46Performance Considerations
- 53:11Experiments
- 56:15Conclusions
related talks
52mC++ Game Development - Techniques to Optimise Multithreaded Data Building
01h 04mThe C++20 Synchronization Library
01h 04m[old version]The C++20 Synchrononization Library
01h 02mTaro: Task Graph-Based Asynchronous Programming Using C++ Coroutine
01h 02mC++20’s Coroutines for Beginners
53mC++ Coroutines and Structured Concurrency in Practice
01h 08mWork Contracts - Rethinking Task Based Concurrency & Parallelism for Low Latency C++
55mC++20 coroutines as an API principle
