News Score: Score the News, Sort the News, Rewrite the Headlines

A Mental Model for C++ Coroutine

C++ coroutine is not a library that is ready to go (e.g. std::vector). It is not even a trait (think of Rust’s Future trait) that library writers or users can implement (or the compiler generates for you in the case of Rust). C++ coroutine is a specification that defines a set of customization points, that requires library writers to implement in order to get a functional coroutine. A function supports two operations - call and return. A corotuine (in any language) is a generalization of a funct...

Read more at uvdn7.github.io

© News Score  score the news, sort the news, rewrite the headlines