TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 230 subscribers
Post #25482 15
coroutil queues: library-agnostic queues for C++20 coroutines

Repo: [
https://github.com/tzcnt/coro\util](https://github.com/tzcnt/coroutil)

Documentation: [
https://fleetcode.com/oss/coro\util/docs/queues/index.html](https://fleetcode.com/oss/coroutil/docs/queues/index.html)

coro\
util is a collection of data structures for C++20 coroutines that aren't tied to any task or executor library. Each structure is a template that accepts a policy object which binds it to your library of choice. I've include pre-configured adapters for several libraries: YACLib, Boost.Cobalt, Asio, Boost.Capy, libfork, concurrencpp, cppcoro, and libcoro. Adding a custom adapter for your own library is also relatively simple, and I've provided an agent prompt that automates it.

These queues were all written for the TooManyCooks framework, which as far as I know, has the most complete suite of general purpose async data structures of any publicly available library. This first edition only includes the 5 queues. The next batch will include the control structures (mutex, semaphore, etc.). I've decided to port them to be dependency-free in an effort to advance the interoperability of the C++20 coroutine ecosystem, which IMO is too siloed right now. I aim to demonstrate and evangelize for a style of code that is "sans-executor/task".

All of the queues are lock-free and wait-free on the fast path, and offer purely zero-copy operation. They have been rigorously tested and examined over their lifetime in TooManyCooks, and I believe them to be production-ready.

https://redd.it/1udi88p
@r_cpp
More from @r_cpp
  1. Sep 29, 2026Boost.Graph 1.95 will be C++17 Dear Boost.Graph community, In two release cycles (Boost re…
  2. Sep 26, 2026Token Sequence Injection & Modern Macros: The Most Game-Changing Compile-Time Feature in C…
  3. Sep 25, 2026myStringStream.str("") Considered Harmful Under C++20 I was recently looking at some (rath…
  4. Sep 20, 2026A clever branch free optimization I'm the developer of memlz which is an extremely fast co…
  5. Sep 15, 2026Inside Boost.PolyCollection https://bannalia.blogspot.com/2026/09/inside-boostpolycollecti…
  6. Sep 11, 2026C++26: Standard Library Hardening Experiments https://www.cppstories.com/2026/hardening-ex…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →