C++ Coroutines

Open-source C++ projects categorized as Coroutines Edit details

Top 19 C++ Coroutine Projects

  • Swoole

    🚀 Coroutine-based concurrency library for PHP

    Project mention: Why is Apache clinging to OpenOffice's corpse? | news.ycombinator.com | 2022-06-22

    > I tend to install FOSS because imo they are more "future-proof", but some of them are developed by companies (e.g., Fedora Linux) and that makes me wonder if they're truly future-proof.

    The story of CentOS should be telling that, no, many pieces of software that are backed by a company will not be future-proof and will probably experience certain changes as a consequence of that, be it being transformed to better fit corporate goals (CentOS Stream), or being retired eventually so the company may focus on something else (Atom), or will just be left to slowly rot over time as happens with most code (OpenOffice).

    Then again, it's not like open source projects are that future proof or safe from "drama" either - for example, the Lubuntu project has 2 homepages for no reason: the official one at https://lubuntu.me/ and some other one that serves old versions and is not trusted by my ad blocking solution https://lubuntu.net/

    There are also cases, when open source projects experience fragmentation like happened with Gogs https://gogs.io/ and Gitea https://gitea.io/en-us/ and sometimes there are cases where particular individuals simply cannot work together and as a consequence pretty much the same happens, as was the case with Swoole and Open Swoole: https://github.com/swoole/swoole-src/issues/4434

    Treat most pieces of software that you use as if they might not be there in a year.

  • cocoyaxi

    A go-style coroutine library in C++11 and more.

    Project mention: CO: A go-style coroutine library for C++ | news.ycombinator.com | 2022-03-09
  • JetBrains

    Developer Ecosystem Survey 2022. Take part in the Developer Ecosystem Survey 2022 by JetBrains and get a chance to win a Macbook, a Nvidia graphics card, or other prizes. We’ll create an infographic full of stats, and you’ll get personalized results so you can compare yourself with other developers.

  • cppcoro

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

    Project mention: My thoughts and dreams about a standard user-space I/O scheduler | reddit.com/r/cpp | 2022-04-28

    Because the whole application is running under a single thread there is no need for atomic operations in synchronization primitives(which most of the time requires seq_cst memory order and CMPXCHG which is an expensive instruction in CPU). for example what async_mutex would look like if it knows it's running in a single-threaded scheduler (a non-atomic state variable and waiters queue).

  • concurrencpp

    Modern concurrency for C++. Tasks, executors, timers and C++20 coroutines to rule them all

    Project mention: concurrencpp VS MTL - a user suggested alternative | libhunt.com/r/concurrencpp | 2022-02-28
  • libfiber

    The high performance coroutine library for Linux/FreeBSD/MacOS/Windows, supporting select/poll/epoll/kqueue/iocp/windows GUI (by iqiyi)

    Project mention: Any C Asynchronous libraries I can translate to? | reddit.com/r/ProgrammingLanguages | 2021-07-06

    Consider https://github.com/iqiyi/libfiber (and not the same-name https://github.com/brianwatling/libfiber, which isn't active, nor https://github.com/evanj/libfiber, which has a nice article that goes with it: https://www.evanjones.ca/software/threading.html).

  • swoole-src

    Programmatic server for PHP with async IO, coroutines and fibers (by openswoole)

    Project mention: 150,000 /r/php Members! | reddit.com/r/PHP | 2022-06-23

    if any of these bad people want to hurt you again - tell them that with swoole php is better then their language X. because it is. JavaScripters hate this.

  • restc-cpp

    Modern C++ REST Client library

    Project mention: REST library: production 'ready' | reddit.com/r/cpp_questions | 2022-06-20

    https://github.com/jgaa/restc-cpp (beta)

  • Scout APM

    Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.

  • corobase

    Coroutine-Oriented Main-Memory Database Engine, VLDB 2021.

    Project mention: CoroBase: a research database engine that models transactions as C++20 coroutines to hide cache misses | reddit.com/r/cpp_coroutines | 2022-04-17
  • Forkpool

    A bleeding-edge, lock-free, wait-free, continuation-stealing scheduler for C++20

    Project mention: riften::Forkpool | reddit.com/r/cpp | 2021-09-12
  • qcoro

    C++ Coroutines for Qt

    Project mention: C++20 coroutines explained simply | reddit.com/r/cpp | 2022-05-13

    I though that with the meager support for coroutines that C++ 20 has, it would take ages till I could use that in Qt, but I discovered that it's actually quite nice with QCoro, which is a 3rd part library that is able to leverage coroutines in Qt's event loop with just an add on. I thought it would require extra facilities in the language/library, plus some large patch to Qt to have the first support of them.

  • charly-vm

    Fibers, Closures, C-Module System | NaN-boxing, bytecode-VM written in C++

    Project mention: The Charly Programming Language | news.ycombinator.com | 2021-10-06
  • coop

    C++20 coroutines-based cooperative multitasking library (by jeremyong)

  • Ichor

    C++20 thread confinement and dependency injection framework.

    Project mention: I'm giving out microgrants to open source projects for the third year in a row! Brag about your projects here so I can see them, big or small! | reddit.com/r/programming | 2021-12-28

    I've been working on and off as time permits on Ichor. It's a c++ middleware designed to take away a couple problems I had with writing large scale applications:

  • libcoro

    C++20 coroutine library

  • packio

    An asynchronous msgpack-RPC and JSON-RPC library built on top of Boost.Asio.

  • coro

    Coroutine library and toolkit for C++20

    Project mention: How do you unit test coroutines? | reddit.com/r/cpp | 2021-11-09

    The loop has to be written to go with the coroutines that you're using. Here's one example of some tests for a task coroutine: https://github.com/Felspar/coro/blob/main/test/run/task.cpp and here is one for an IO loop https://github.com/Felspar/poll/blob/main/test/run/basics.cpp#L112-L116 (the `run` method executes the loop until the passed in coroutine is done)

  • Rstein.AsyncCpp

    The RStein.AsyncCpp library is a set of types that should be familiar for anyone who knows the Task Parallel Library (TPL) for .NET (C#).

  • asiochan

    Go-like channels for ASIO C++20 coroutines

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

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2022-06-23.

C++ Coroutines related posts


What are some of the best open-source Coroutine projects in C++? This list will help you:

Project Stars
1 Swoole 17,452
2 cocoyaxi 2,670
3 cppcoro 2,344
4 concurrencpp 944
5 libfiber 622
6 swoole-src 477
7 restc-cpp 472
8 corobase 181
9 Forkpool 122
10 qcoro 112
11 charly-vm 82
12 coop 70
13 Ichor 67
14 libcoro 65
15 packio 45
16 coro 28
17 Rstein.AsyncCpp 26
18 asiochan 17
19 Flow 5
Find remote jobs at our new job board 99remotejobs.com. There are 4 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.
Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.