Workshop Preview: Understanding C++20 Coroutines - Phil Nash Interview ACCU 2025

Workshop Preview: Understanding C++20 Coroutines - Phil Nash Interview ACCU 2025

227 Lượt nghe
Workshop Preview: Understanding C++20 Coroutines - Phil Nash Interview ACCU 2025
https://accu.org https://www.accuconference.org/ Kevin Carpenter from @cppevents sits down with Phil Nash to discuss his upcoming Online Workshop for the ACCU 2025 conference, titled 'Understanding C++20 Coroutines' Join Kevin and Phil for a preview of this highly informative online workshop! View More Information: https://accuconference.org/2025/session/understanding-cpp20-coroutines Online Workshop: Understanding C++20 Coroutines Scheduled for 09:00-18:00, Saturday, 12th April 2025 --- Coroutines, introduced in C++20, offer a powerful new method for managing the flow of execution in your code. Whether you need to alternate between two or more streams of code in a linear fashion or handle fully asynchronous tasks, Coroutines present a fresh C++ approach to these challenges. They provide the low-level control necessary to achieve optimal performance (with some caveats) while also simplifying the code you write. Though they address a complex set of problems, Coroutines can be tamed! We’ll look at how to get started with minimal knowledge and effort, and then scale up to a solid understanding of how it all hangs together under the hood — and we will use that knowledge to good effect. Outline - A compiler-driven approach to understanding coroutines by writing them - Our first MVP coroutine - Resuming and destroying coroutines - Getting data out of coroutines with - with co_return - with co_yield - Generators and C++26's std::generate - Awaiters - Trivially awaitable types - Writing an awaiter (compiler-driven) - Passing values back into the coroutine - A sleeping awaiter - Resuming on a different thread - await_transform - coroutine_traits - Custom allocators and the HALO optimisation - RAII helper for managing handles (and following the rule of zero) - Use cases and larger scale worked example --- The ACCU Conference is the annual conference of the ACCU membership, but is open to any and all who wish to attend. The tagline for the ACCU is "Professionalism in Programming", which captures the whole spectrum of programming languages, tools, techniques and processes involved in advancing our craft. While there remains a core of C and C++ - with many members participating in respective ISO standards bodies - the conference, like the organisation, embraces other language ecosystems and you should expect to see sessions on C#, D, F#, Go, Javascript, Haskell, Java, Kotlin, Lisp, Python, Ruby, Rust, Swift and more. There are always sessions on TDD, BDD, and how to do programming correctly. The ACCU Conference is a conference by programmers for programmers about programming. ACCU Membership: https://tinyurl.com/ydnfkcyn 2025 Program - https://accuconference.org/2025/schedule https://accu.org https://www.accuconference.org/ https://mastodon.social/@ACCUConf https://www.linkedin.com/showcase/accu-conference/ https://bsky.app/profile/accuconf.bsky.social https://www.facebook.com/accuorg --- Phil Nash Phil is the original author of the C++ test framework, Catch2 and is an independent consultant and trainer, specialising in TDD and Modern C++. Formerly Developer Advocate at Sonar and JetBrains he has had a career that spans finance, mobile and software security. He's also a member of the ISO C++ standards committee, organiser of C++ London and C++ on Sea, as well as co-host and producer of CppCast. --- Hosted by Kevin Carpenter: @cppevents --- YouTube Videos Filmed, Edited & Optimised by Digital Medium: https://events.digital-medium.co.uk #accuconf #programming #cpp #cplusplus #cpp #cppprogramming #cplusplusprogramming #coding #softwaredevelopment #code #programmer #softwareengineering #coding #software