MHN

Show HN: Coros – A Modern C++ Library for Task Parallelism

129 points by singledigits·796 days ago·github.com·Show in HN

Hello Hacker News.

I’m Martin, a graduate student from Prague, and I’ve been working on Coros, a C++ library for task-based parallelism.

After spending some time with OpenMP and oneTBB, I wanted to try building a library using modern features from the C++ standard library. I’ve used coroutines for task encapsulation and C++23 expected for exception handling, while trying to maintain good performance.

Additionally, I’ve implemented monadic-like behavior to allow easy chaining of tasks, similar to the monadic operations in std::expected.

You can check out the project here: https://github.com/mtmucha/coros

While this library isn’t fully-fledged or production-ready, I’d really appreciate your feedback!

Add a comment on Hacker News →
1 of 58 comments
  1. At Meta folly::Coro is used pretty heavily. Have you taken a look at it? Wondering if there are any advantages. The api seems fairly similar to me at a glance.

    https://github.com/facebook/folly/tree/main/folly/experiment...