About the Book
Explore C++20 and C++23 features for efficient concurrent programming. Learn how to manage tasks, futures, and coroutines to write responsive and scalable C++ code. Enhance your applications with better control and execution
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 DescriptionAs hardware continues to evolve with greater memory capacity and multi-core processors, software must keep pace to efficiently utilize available resources and minimize idle CPU cycles. In this book, you will explore a wide range of parallel programming paradigms, including concurrent, parallel, multithreading, reactive, and event-driven programming, as well as dataflows. It clarifies the relationships between threads, processes, and services while guiding you through thread creation and management. You'll gain hands-on experience with C++’s thread-safety mechanisms, such as mutual exclusion, atomic operations, semaphores, condition variables, latches, and barriers.
Unlike other books, it offers an in-depth approach to building and implementing asynchronous applications in C++. You'll master core concepts like futures, promises, async functions, and coroutines, alongside practical applications using third-party libraries. Step by step, you’ll leverage Boost.Asio and Boost.Cobalt to develop network and low-level I/O solutions while learning proven performance optimization techniques, testing strategies, and debugging methods.
By the end of this book, you'll be equipped to develop high-performance applications using C++20 and C++23's cutting-edge asynchronous programming techniquesWhat 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 forThis book is for software engineers, developers and system programmers with some prior experience of C++ coding principles and familiar with networking, hardware and Linux systems. If you want to improve your C++ skills and learn to develop high-performance software using the latest modern C++ features, this book is for you. It will teach you how and when to use the latest C++ features to develop asynchronous solutions, to test and debug multithreaded software. By the end of the book, you will be well-equipped to implement high-performance software by using the most modern C++ techniques.
Table of Contents:
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
About the Author :
Javier Reguera-Salgado is a seasoned software engineer with 19+ years of experience, specializing in high-performance computing, real-time data processing, and communication protocols.
Skilled in C++, Python, and a variety of other programming languages and technologies, his work spans low-latency distributed systems, mobile apps, web solutions, and enterprise products. He has contributed to research centers, start-ups, blue-chip companies, and quantitative investment firms in Spain and the UK.
Javier holds a PhD cum laude in high-performance computing from the University of Vigo, Spain.
Juan Antonio Rufes is a software engineer with 30 years of experience, specializing in low-level and systems programming, primarily in C, C++, 0x86 assembly, and Python.
His expertise includes Windows and Linux optimization, Windows kernel drivers for antivirus and encryption, TCP/IP protocol analysis, and low-latency financial systems such as smart order routing and FPGA-based trading systems. He has worked with software companies, investment banks, and hedge funds.
Juan holds an MSc in electrical engineering from the Polytechnic University of Valencia, Spain.