2 ms·
Yeah there aren't many good resources on it unfortunately. One thing to note is C++20's coroutine support is really low level. It's designed for library authors
by IshKebab 2y ago
Yeah there aren't many good resources on it unfortunately. One thing to note is C++20's coroutine support is really low level. It's designed for library authors so that they can build the kinds of things "normal" people want - tasks, generators, futures, promises, etc.
This video is the best intro I've found. It actually explains what is happening in memory, which is the only way to really understand anything in C++.
https://youtu.be/aibjUHx7vew https://youtu.be/aibjUHx7vew
Also this is decent:
https://www.scs.stanford.edu/~dm/blog/c++-coroutines.html https://www.scs.stanford.edu/~dm/blog/c++-coroutines.html
But don't try and write a coroutine library yourself. Use something like libcoro.