C++ links: Coroutines
https://github.com/MattPD/cpplinks / C++ Standard / C++20 / Coroutines
(draft; work in progress)
#coroutines (C++ Slack): https://cpplang.slack.com/archives/C5JS5JXT5
- Readings: Research
- Software: Examples
- Talks: 2024, 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015
- https://en.cppreference.com/w/cpp/language/coroutines
- Working Draft, C++ Coroutines
- https://wg21.link/n4775
- merged into C++20, http://wg21.link/p0912
- Brain Unrolling: Generators and the Sweet Syntactic Sugar of Coroutines - Adi Shavit
- C++20 Coroutines and io_uring - Pablo Arias
- C++20: A coroutine based stream parser
co_resource<T>
: An RAII coroutine- Coroutines TS Customization Points - https://hackmd.io/s/S1H_loeA7
- Coroutines: step by step; a journey through seven coroutine types
- Daily bit(e) of C++ #441 Mar 17, 2024
- Šimon Tóth
- https://simontoth.substack.com/p/daily-bite-of-c-coroutines-step-by
- http://www.vishalchovatiya.com/cpp20-coroutine-under-the-hood/
- David Mazières
- My tutorial and take on C++20 coroutines - https://www.scs.stanford.edu/~dm/blog/c++-coroutines.html
- Dawid Pilarski
- Coroutines introduction - https://blog.panicsoftware.com/coroutines-introduction/
- Your first coroutine - https://blog.panicsoftware.com/your-first-coroutine/
- co_awaiting coroutines - https://blog.panicsoftware.com/co_awaiting-coroutines/
- How C++ coroutines work - Kirit Sælensminde
- Lewis Baker - C++ Coroutines:
- Coroutine Theory - https://lewissbaker.github.io/2017/09/25/coroutine-theory
- Understanding operator co_await - https://lewissbaker.github.io/2017/11/17/understanding-operator-co-await
- Understanding the promise type - https://lewissbaker.github.io/2018/09/05/understanding-the-promise-type
- Understanding Symmetric Transfer - https://lewissbaker.github.io/2020/05/11/understanding_symmetric_transfer
- Understanding the Compiler Transform - https://lewissbaker.github.io/2022/08/27/understanding-the-compiler-transform
- On the Performance of User-Mode Threads and Coroutines
- August 7, 2020; Ron Pressler
- https://inside.java/2020/08/07/loom-performance/
- Painless C++ Coroutines - Gajendra Gulgulia
- https://ggulgulia.medium.com/painless-c-coroutines-part-1-ba90dd101adb?sk=fad5c9d7985719e96583c999b51c8a1e
- https://ggulgulia.medium.com/painless-coroutines-part2-29b36008b507?sk=6fa83a32164a2a043e6714d0e38886e5
- https://ggulgulia.medium.com/painless-c-coroutine-part-3-536e4bce4f4f?sk=03a1bc6ad642b9398710397a2e7ac3fd
- Rainer Grimm - ModernesCpp.com
- Raymond Chen - A map through the three major coroutine series
- What are coroutines and why should I care? - Marco Alesiani
- cpprefjp - C++日本語リファレンス (Japanese reference)
- language feature - https://cpprefjp.github.io/lang/cpp20/coroutines.html
<coroutine>
- https://cpprefjp.github.io/reference/coroutine.html
- GCC implementation
- https://gcc.gnu.org/wiki/cxx-coroutines
- Initial implementation pushed to master.
- LLVM implementation
- Coroutines in LLVM - https://llvm.org/docs/Coroutines.html
- Debugging C++ Coroutines - https://clang.llvm.org/docs/DebuggingCoroutines.html
- [RFC] [Coroutines] Enable printing coroutine frame in debugger if program is compiled with -g
- CoroGraph: Bridging Cache Efficiency and Work Efficiency for Graph Algorithm Execution
- PVLDB, 17(4) 2023
- Xiangyu Zhi, Xiao Yan, Bo Tang, Ziyao Yin, Yanchao Zhu, Minqi Zhou
- https://www.vldb.org/pvldb/vol17/p891-zhi.pdf
- CoroGraph: Light-weight graph framework based on coroutines
- Software Prefetching for Memory-level Parallelism
- 2022 Ph.D. Dissertation
- Yongkee Kwon
- https://repositories.lib.utexas.edu/handle/2152/116966
- What Are You Waiting For? Use Coroutines for Asynchronous I/O to Hide I/O Latencies and Maximize the Read Bandwidth!
- ADMS 2022: International Workshop on Accelerating Analytics and Data Management Systems Using Modern Processor and Storage Architectures
- Leonard von Merzljak, Philipp Fent, Thomas Neumann, Jana Giceva
- https://db.in.tum.de/~fent/papers/coroutines.pdf
- micro-benchmarks to examine the benefits of asynchronous I/O for query processing using C++ coroutines and io_uring
- High-Performance In-Memory OLTP via Coroutine-to-Transaction
- 2021 M.Sc. Thesis
- Yongjun He
- https://summit.sfu.ca/item/34670
- https://github.com/sfu-dis/corobase
- CoroBase: Coroutine-Oriented Main-Memory Database Engine
- VLDB 2021
- Yongjun He, Jiacheng Lu, Tianzheng Wang
- a research database engine that models transactions as C++20 coroutines to hide cache misses
- https://github.com/sfu-dis/corobase
- https://arxiv.org/abs/2010.15981
- http://www.vldb.org/pvldb/vol14/p431-he.pdf
- Bridging the Latency Gap between NVM and DRAM for Latency-bound Operations
- interleaving task execution with C++20 coroutines to hide memory access latency
- Data Management on New Hardware (DaMoN) 2019
- Georgios Psaropoulos, Ismail Oukid, Thomas Legler, Norman May, Anastasia Ailamaki
- https://dl.acm.org/citation.cfm?id=3329917
- Don’t stall – multitask! Random access to main memory with cache-like performance
- Exploiting Coroutines to Attack the "Killer Nanoseconds"
- PVLDB 11, 11 (July 2018)
- Christopher Jonathan, Umar Farooq Minhas, James Hunter, Justin Levandoski, Gor Nishanov
- http://www.vldb.org/pvldb/vol11/p1702-jonathan.pdf
- Interleaving with Coroutines: A Practical Approach for Robust Index Joins
- PVLDB 11, 2 (October 2017)
- Georgios Psaropoulos, Thomas Legler, Norman May, and Anastasia Ailamaki
- http://www.vldb.org/pvldb/vol11/p230-psaropoulos.pdf
- Conduit: Lazy High Performance Streams using Coroutine TS
- Corral: lightweight structured concurrency for C++20
- CppCoro - A coroutine library for C++
- https://github.com/lewissbaker/cppcoro
- Maintained fork of cppcoro
- cxx-async: Simple interoperability between C++ coroutines and asynchronous Rust
- folly::coro - a developer-friendly asynchronous C++ framework based on Coroutines TS
- https://github.com/facebook/folly/tree/main/folly/coro
- https://github.com/facebook/folly/blob/main/folly/experimental/coro/README.md
- https://cppcast.com/2019/03/kirk-shoop/
- Async Stack Traces for C++ Coroutines in Folly
- 2021; Lee Howes and Lewis Baker
- Introduction - https://developers.facebook.com/blog/post/2021/09/16/async-stack-traces-folly-Introduction/
- Synchronous and asynchronous stack traces - https://developers.facebook.com/blog/post/2021/09/23/async-stack-traces-folly-synchronous-asynchronous-stack-traces/
- Forming an async stack from individual frames - https://developers.facebook.com/blog/post/2021/09/30/async-stack-traces-folly-forming-async-stack-individual-frames/
- Walking the async stack - https://developers.facebook.com/blog/post/2021/10/14/async-stack-traces-c-plus-plus-coroutines-folly-walking-async-stack/
- Async stack traces in folly: Improving debugging in the developer lifecycle - https://developers.facebook.com/blog/post/2021/10/21/async-stack-traces-folly-improving-debugging-developer-lifecycle/
- libc++
- http://cppcast.com/2017/07/gor-nishanov/
- Compiler Explorer: Coroutines clang demo - https://godbolt.org/g/pq6x57
- Wandbox: Coroutines with Ranges - https://wandbox.org/permlink/D60wIndMZbth7BXS
- David Hollman - https://twitter.com/TheWholeDavid/status/1063135275671535616
- Boost.Asio
- Coop: C++20 coroutines-based cooperative multitasking library
- coro-async - C++ coroutine based networking library (WIP)
- Coroutine TS: A new way of thinking - https://github.com/arBmind/2018-cogen-en
- Exploring the C++ Coroutine - https://github.com/luncliff/coroutine/
- generator: Single-header, ranges-compatible generator type built with C++20 coroutines.
- coro: Single-header library facilities for C++2a Coroutines
- C++ Coroutines and Structured Concurrency in Practice
- C++ Coroutines at Scale - Implementation Choices at Google
- C++ Coroutines - Don’t Try This at Home
- ACCU 2024
- Lieven de Cock
- https://www.youtube.com/watch?v=SVm99X3I-JY
- Coroutines and gRPC
- Introduction to Coroutines
- Utah C++ Programmers 2024
- Richard Thomson
- https://www.youtube.com/watch?v=p2UBok-rTrg
- What We’ve Been Awaiting For? - How to Build a C++ Coroutine Type
- Adventures in Thread-per-Core Async with Redpanda and Seastar
- P99 CONF 2023
- Travis Downs
- https://www.youtube.com/watch?v=pOIoeFuIUKQ
- An Introduction to C++ Coroutines Through a Thread Scheduling Demonstration
- C++ Coroutine Intuition
- Implementing a C++ Coroutine Task from Scratch
- Asynchronous I/O (io_uring) and Coroutines for Smooth Data Streaming
- C++ Coroutines, from Scratch
- Phil Nash
- https://levelofindirection.com/refs/coroutines
- CppNow 2022
- MUC++ 2022
- C++20’s Coroutines for Beginners
- CppCon 2022; Andreas Fertig
- https://www.youtube.com/watch?v=8sEe-4tig_A
- Coroutines - C++ vs Rust
- ACCU 2022; Jonathan Müller
- https://www.youtube.com/watch?v=aa43fYHgnfo
- Deciphering Coroutines - A Visual Approach
- Andreas Weis
- CppCon 2022
- MUC++ 2022
- How to Use C++20 Coroutines for Networking
- Powerful Data Processing Pipelines with C++20 Coroutines
- ACCU 2022; Andreas Weis
- https://www.youtube.com/watch?v=KhGmOI478so
- Understanding C++ Coroutines by Example
- C++ on Sea 2022; Pavel Novikov
- Part 1: https://www.youtube.com/watch?v=tj0URCY_A1s
- Part 2: Generators: https://www.youtube.com/watch?v=9p7obE9KRoU
- Asynchronous I/O and coroutines for smooth data streaming
- NDC TechTown 2021; Björn Fahller
- https://www.youtube.com/watch?v=uPJFj3b8RN0
- https://speakerdeck.com/rollbear/o-and-coroutines-for-smooth-data-streaming
- Automatically Process Your Operations in Bulk With Coroutines
- CppCon 2021; Francesco Zoffoli
- https://www.youtube.com/watch?v=3R_Z5RO1AH4
- https://github.com/MakersF/cppcon-2021-corobatch
- corobatch: makes batching operations easy by transforming your single-item code to perform batched operations thanks to coroutines
- Combining Co-Routines and Functions into a Job System
- CppCon 2021; Helmut Hlavacs
- https://www.youtube.com/watch?v=XtFWxwDX7D4
- Converting a State Machine to a C++ 20 Coroutine
- C++20 coroutines as an API principle
- Meeting C++ 2021; Marc Mutz
- https://www.youtube.com/watch?v=tvdwYwTyrig
- https://meetingcpp.com/mcpp/slides/2021/noi9766.pdf
- From Problem to Coroutine: Reducing I/O Latency
- CppCon 2021; Cheinan Marks
- https://www.youtube.com/watch?v=N__eTyrLAF0
- How to start using coroutines
- NDC TechTown 2021; Mikhail Svetkin
- https://www.youtube.com/watch?v=6AIYIf5Vr18
- Implementing Generators with C++20 Coroutines
- 2021; Sy Brand
- https://www.youtube.com/watch?v=D0snE2-BOwM
- generator: Single-header, ranges-compatible generator type built with C++20 coroutines.
- Understanding C++ Coroutines by Example
- C++ London 2021; Pavel Novikov
- https://www.youtube.com/watch?v=7sKUAyWXNHA
- Slides: https://toughengineer.github.io/talks/C++%20Russia%202020%20Moscow/
- Using Coroutines to Implement C++ Exceptions for Freestanding Environments
- CppCon 2021; Eyal Zedaka
- https://www.youtube.com/watch?v=TsXYqnUXrwM
- https://github.com/eyalz800/zpp_throwing
- 40 Years Of Evolution from Functions to Coroutines
- Building a Coroutine based Job System without Standard Library
- Corobatch - Batch operations, simply, with coroutines
- C++ London, May 2020; Francesco Zoffoli
- https://www.youtube.com/watch?v=vzi0lTVyb-g
- Corobatch: makes batching operations easy by transforming your single-item code to perform batched operations thanks to coroutines
- code::dive 2019 - C++20 Coroutines: Introduction
- code::dive 2019 - C++20 Coroutines: Asynchronity reimagined
- code::dive 2019 - C++20 Coroutines: What's next?
- Exploring C++20 Coroutines
- C/C++ Dublin User Group 2019; Justin Durkan
- https://www.youtube.com/watch?v=RhXaKOe3JZM
- https://drive.google.com/file/d/1sHtERPE4tgn2R4QeAAN-TlSD_gd9CE3d/view
- Structured Concurrency: Writing Safer Concurrent Code with Coroutines and Algorithms
- CppCon 2019; Lewis Baker
- https://www.youtube.com/watch?v=1Wy5sq3s2rg
- 2019 GNU Tools Cauldron: Iain Sandoe - C++20 Coroutines in GCC
- 2019 Adi Shavit - Generators, Coroutines and Other Brain Unrolling Sweetness
- NDC TechTown: https://www.youtube.com/watch?v=CwCJBpB7Z5w
- CppCon: https://www.youtube.com/watch?v=qYHDERleSL8
- CoreHard Autumn: https://www.youtube.com/watch?v=qjQBAgsj9CI
- code::dive 2019
- 2019 Core C++: Yehezkel Bernat - Coroutines - the future of future (and more)
- 2019 C++ Korea Facebook Group: Park Dong Ha - Exploring the C++ Coroutine: Approach, Compiler, and Issues
- 2018 Meeting C++: Andreas Reischuck - Coroutine TS a new way of thinking
- 2018 CppCon: G. Nishanov “Nano-coroutines to the Rescue! (Using Coroutines TS, of Course)”
- 2018 LLVM Developers’ Meeting: J. McCall “Coroutine Representations and ABIs in LLVM”
- 2018 Core C++: Yehezkel Bernat - Coroutines - Back to the Future
- 2017 CppCon: Anthony Williams “Concurrency, Parallelism and Coroutines” - https://www.youtube.com/watch?v=JvHZ_OECOFU
- 2017 CppCon: Gor Nishanov “Naked coroutines live (with networking)” - https://www.youtube.com/watch?v=UL3TtTgt3oU
- 2017 CppCon: Toby Allsopp “Coroutines: what can't they do?” - https://www.youtube.com/watch?v=mlP1MKP8d_Q
- 2017 Pacific++: Toby Allsopp "An Introduction to the Proposed Coroutine Support for C++"
- 2016 await/yield: C++ coroutines - Zbigniew Skowron - 30 November, 2016 - http://cpp.mimuw.edu.pl/files/await-yield-c++-coroutines.pdf
- 2016 CppCon: Gor Nishanov “C++ Coroutines: Under the covers" - https://www.youtube.com/watch?v=8C8NnE1Dg4A
- 2016 CppCon: James McNellis “Introduction to C++ Coroutines" - https://www.youtube.com/watch?v=ZTqHjjm86Bw
- 2016 LLVM Developers’ Meeting: G. Nishanov “LLVM Coroutines” - https://www.youtube.com/watch?v=Ztr8QvMhqmQ
- 2015 C++Now - Gor Nishanov: C++17 coroutines for app and library developers - https://www.youtube.com/watch?v=proxLbvHGEQ
- 2015 CppCon: Gor Nishanov “C++ Coroutines - a negative overhead abstraction" - https://www.youtube.com/watch?v=_fu0gx-xseY
- 2015 Meeting C++: An Introduction to C++ Coroutines - James McNellis - https://www.youtube.com/watch?v=YYtzQ355_Co
Thanks for mentioning my talk from Core C++ meetup!
It worth mentioning that the video is in Hebrew.
Also, I had a similar talk (much improved version, in my eyes) at Core C++ 2019 conference last week.
The video isn't available yet, but the slides and code samples are already available here:
https://github.com/YehezkelShB/CoreCpp2019-Coroutines