CppCon 2020 Building a Coroutine based Job System without Standard Library--Tanki Zhang

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!

Building a Coroutine based Job System without Standard Library

by Tanki Zhang

Summary of the talk:

A job system is a common game engine component to improve total CPU throughput. In this talk, I will walk through building a coroutine-based job system and explain the advantages of using coroutines over the typical ways to build a job system.

We shipped coroutines in C++20, but why does it matter for users, especially since there’s no standard library support? The answer is the coroutine semantics. Developers can customize the behavior of `co_return`, `co_yield`, `co_await` to build their own systems without any dependency of the standard library. For game developers, this is important because many game studios forbid the use of the standard library. The coroutine language feature itself is flexible enough to build a system with 100% control, which is exactly what engine developers want—no black box, no magic.

I will discuss the design decision I made, trade-offs, and current limitations. This talk is a crash course for system developers who want to build systems independently from the standard library and will also discuss possible future directions for this language feature.

This is an advanced coroutine talk and I expect attendees to have basic understanding about how (c++)coroutine works. Here is a useful link for some related materials if you want more information before attending this talk: https://gist.github.com/MattPD/9b55db...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.