Asynchronous Programming with C++: Build blazing-fast software with multithreading and asynchronous programming for ultimate efficiency

$41.99
by Javier Reguera-Salgado

Shop Now
Design and develop high-performance software solutions by using concurrent and asynchronous techniques provided by the most modern features in C++20 and C++23 Key Features Learn how to use modern C++ features, including futures, promises, async, and coroutines to build asynchronous solutions - Develop cross-platform network and low-level I/O projects with Boost.Asio - Master optimization techniques by understanding how software adapts to machine hardware - Purchase of the print or Kindle book includes a free PDF eBook Book Description As hardware advancements continue to accelerate, bringing greater memory capacity and more CPU cores, software must evolve to adapt to efficiently use all available resources and reduce idle CPU cycles. In this book, two seasoned software engineers with about five decades of combined experience will teach you how to implement concurrent and asynchronous solutions in C++. You’ll gain a comprehensive understanding of parallel programming paradigms—covering concurrent, asynchronous, parallel, multithreading, reactive, and event-driven programming, as well as dataflows—and see how threads, processes, and services are related. Moving into the heart of concurrency, the authors will guide you in creating and managing threads and exploring C++’s thread-safety mechanisms, including mutual exclusion, atomic operations, semaphores, condition variables, latches, and barriers. With this solid foundation, you’ll focus on pure asynchronous programming, discovering futures, promises, the async function, and coroutines. The book takes you step by step through using Boost.Asio and Boost.Cobalt to develop network and low-level I/O solutions, proven performance and optimization techniques, and testing and debugging asynchronous software. By the end of this C++ book, you’ll be able to implement high-performance software using modern asynchronous C++ techniques. What you will learn Explore the different parallel paradigms and know when to apply them - Acquire deep knowledge of thread management and safety mechanisms - Understand asynchronous programming in C++, including coroutines - Leverage network asynchronous programming by using Boost.Asio and Boost.Cobalt - Add proven performance and optimization techniques to your toolbox - Find out how to test and debug asynchronous software Who this book is for This book is for developers who have some experience using C++, regardless of their professional field. If you want to improve your C++ skills and learn how to develop high-performance software using the latest modern C++ features, this book is for you. Table of Contents Parallel Programming Paradigms - Processes, Threads, and Services - How to Create and Manage Threads in C++ - Thread Synchronization with Locks - Atomic Operations - Promises and Futures - The Async Function - Asynchronous Programming Using Coroutines - Asynchronous Programming Using Boost.Asio - Coroutines with Boost.Cobalt - Logging and Debugging Asynchronous Software - Sanitizing and Testing Asynchronous Software - Improving Asynchronous Software Performance “Asynchronous Programming with C++ is a comprehensive, well-crafted guide that truly stands out in its breadth and depth. Authors Javier and Juan have done an outstanding job, making this book a valuable resource for intermediate and advanced C++ developers alike. The book balances theoretical explanations with practical examples and walks you through everything from basic multithreading techniques to advanced coroutines. A major highlight is its dedicated coverage of Boost libraries, including Boost.Asio and Boost.Cobalt. Critically, the book doesn't just explain how to write asynchronous code—it dives into testing strategies tailored specifically for concurrent and asynchronous software­—a rare and highly valuable addition, as many books skip over testing or treat it as an afterthought. The authors provide practical approaches using sanitizers, stress testing, and mock-based unit tests, giving developers the tools they need to write reliable and maintainable async code. Overall, this is an up-to-date resource for any C++ developer aiming to master asynchronous programming. It’s well-organized, thorough, and filled with practical wisdom drawn from real-world experience. Highly recommended.” John E. Farrier, Founder of Polyrhythm, Published Author “This book does a great job of explaining async programming in general and how one can utilize C++ to achieve it. It does so by demonstrating how it can be done with examples using std::thread and the standard synchronization primitives, atomics, std::async, coroutines, Boost.ASIO, and Boost.Cobalt (which provides C++ coroutines classes). I appreciate that the books explains when you should consider using the different options. Towards the end, it goes over how you can micro-benchmark and what you need to consider when micro-benchmarking. I haven't had much use for most of the C++11 threading APIs in my embedded career, but after

Customer Reviews

No ratings. Be the first to rate

 customer ratings


How are ratings calculated?
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzes reviews to verify trustworthiness.

Review This Product

Share your thoughts with other customers