C++ coroutines and Qt
summary
QCoro implements C++20 coroutines for Qt types and shows concrete examples: QCoro library wraps QNetworkReply, QProcess, QIODevice, QTcpServer and QDBus so code reads synchronously while actually suspending the event loop, avoiding nested loops and callbacks. It explains the promise/await_transform plumbing, shows co_await on replies and co_await QNetworkReply resumes on finished signals, and reports a working MIT‑licensed library that builds on GCC/Clang/MSVC across Linux/macOS/Windows and is extensible for custom Qt types.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 3:26Nesting Event Loops
- 6:39Asynchronous Operations
- 7:54Member Functions
- 12:25Getusername
- 14:40Pain Points
- 15:35Solution
- 15:45Example
- 18:28Call chain
- 28:04QueueCorro Types
- 30:53Code Example
- 36:13CoAwaiting
- 37:28Future plans
- 42:33Questions
related talks
01h 05mWhy use coroutines for asynchronous applications
01h 02mC++20’s Coroutines for Beginners
58mAn Introduction to C++ Coroutines
53mC++ Coroutines and Structured Concurrency in Practice
01h 05mCoroutines: C++ vs Rust
45mAsynchrony and Coroutines
01h 03mDeciphering C++ Coroutines - A Diagrammatic Coroutine Cheat Sheet
01h 00mUsing Coroutines to Implement C++ Exceptions for Freestanding Environments
