Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Grab it
Explore coroutines in Qt for safer thread pool interactions in this 52-minute conference talk. Learn how to solve common problems in asynchronous applications by offloading tasks to worker threads. Discover techniques to improve code readability, prevent race conditions, and handle object lifetimes effectively. Gain insights into using C++ 20 coroutines to write sequential syntax for asynchronous code, automatically migrate execution between threads, guard against race conditions, and ensure result storage validity. Follow along with a real-world Qt-based example and learn design principles for implementing coroutines in GUI applications. Understand the challenges of the ping-pong pattern and compare different approaches, including Qt's QObjects and nested lambdas. Dive into coroutine concepts, operations, and practical implementations in C++. Explore incremental steps to create a robust solution for thread pool interactions, including self-dispatching coroutines, automated lifetime checks, and guarding thread-unsafe pointers.
Read more
Coroutines are Qt - Safer Thread Pools Interactions