Do people have some motivating examples for co-routines?

This page summarizes the projects mentioned and recommended in the original post on /r/cpp

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • CoroGB

    CoroGB is an experimental gameboy emulator written in C++ w/ coroutines

  • A Gameboy emulator that uses coroutines and custom awaitable types to handle component scheduling: https://github.com/TheThief/CoroGB

  • Web

    Old experimental web server using fibers, io completion ports, and some early C++11 features. (by TheThief)

  • 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

  • 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.

    WorkOS logo
  • drdestructo2

    Repository for Return of Dr. Destructo, a remake of "Island of Dr. Destructo"

  • 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:

  • coproto

    Discontinued A protocol framework based on coroutines

  • Here's a networking library that compares with and without coroutines. https://github.com/ladnir/coproto

  • hardglitch

    JS project led by Klaim in HomeTeamGameDev, May 17 - Oct 11, 2020

  • 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)

  • libunifex

    Unified Executors

  • Yeah here's an example of code that uses coroutines: https://github.com/facebookexperimental/libunifex/blob/8311d141d6654acbff269b90f1836c3186b4a092/examples/linux/io_epoll_test.cpp#L165

  • cppcoro

    A library of C++ coroutine abstractions for the coroutines TS

  • I used cppcoro to build this library (still working on it).

  • 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.

    InfluxDB logo
  • 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)

  • Feel free to take a look: https://github.com/manuelmeraz/flow

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts