Our great sponsors
-
Web
Old experimental web server using fibers, io completion ports, and some early C++11 features. (by TheThief)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
Flow
Flow is a software framework focused on ease of use while maximizing performance in closed closed loop systems (e.g. robots). Flow is built on top of C++ 20 coroutines and utilizes modern C++ techniques. (by ManuelMeraz)
A Gameboy emulator that uses coroutines and custom awaitable types to handle component scheduling: https://github.com/TheThief/CoroGB
A webserver I created ages ago that used OS fibers for parallel request processing in a very similar manner to how you could use coroutines: https://github.com/TheThief/Web
I haven't got an example in C++, but I got an example in Lua mixed with C++, which I used for my pet project some years ago. Here it is. Let's see what's happening here:
Here's a networking library that compares with and without coroutines. https://github.com/ladnir/coproto
Not C++ but I'm working on a turn-by-turn game with animations etc. which relies a lot on coroutines (in JavaScript for this one). The code is there if you want to take a look: https://github.com/gamkedo-la/hardglitch (the game is playable there in the deployments, or in it's released version on itch: https://klaim.itch.io)
Yeah here's an example of code that uses coroutines: https://github.com/facebookexperimental/libunifex/blob/8311d141d6654acbff269b90f1836c3186b4a092/examples/linux/io_epoll_test.cpp#L165
I used cppcoro to build this library (still working on it).
Feel free to take a look: https://github.com/manuelmeraz/flow