Asynchronous Programming with C++: Build blazing-fast software with multithreading and asynchronous programming for ultimate efficiency
暫譯: C++非同步程式設計:利用多執行緒與非同步程式設計打造超高速軟體以達到最佳效率

Reguera-Salgado, Javier, Rufes, Juan Antonio

  • 出版商: Packt Publishing
  • 出版日期: 2024-11-29
  • 售價: $1,760
  • 貴賓價: 9.5$1,672
  • 語言: 英文
  • 頁數: 424
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1835884245
  • ISBN-13: 9781835884249
  • 相關分類: C++ 程式語言
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

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

商品描述(中文翻譯)

設計和開發高效能的軟體解決方案,利用 C++20 和 C++23 中提供的並發和非同步技術

主要特點:
- 學習如何使用現代 C++ 特性,包括 futures、promises、async 和 coroutines 來構建非同步解決方案
- 使用 Boost.Asio 開發跨平台的網路和低階 I/O 專案
- 通過理解軟體如何適應機器硬體來掌握優化技術
- 購買印刷版或 Kindle 書籍可獲得免費 PDF 電子書

書籍描述:
隨著硬體技術的持續進步,帶來更大的記憶體容量和更多的 CPU 核心,軟體必須演變以適應有效利用所有可用資源並減少閒置的 CPU 週期。在本書中,兩位擁有約五十年綜合經驗的資深軟體工程師將教您如何在 C++ 中實現並發和非同步解決方案。

您將全面了解平行程式設計範式,涵蓋並發、非同步、平行、多執行緒、反應式和事件驅動程式設計,以及資料流,並了解執行緒、進程和服務之間的關係。深入並發的核心,作者將指導您創建和管理執行緒,並探索 C++ 的執行緒安全機制,包括互斥、原子操作、信號量、條件變數、鎖存器和障礙。建立這個堅實的基礎後,您將專注於純非同步程式設計,發現 futures、promises、async 函數和 coroutines。本書將逐步引導您使用 Boost.Asio 和 Boost.Cobalt 開發網路和低階 I/O 解決方案,提供經過驗證的效能和優化技術,以及測試和除錯非同步軟體的方法。

在本 C++ 書籍結束時,您將能夠使用現代非同步 C++ 技術實現高效能的軟體。

您將學到的內容:
- 探索不同的平行範式並了解何時應用它們
- 獲得執行緒管理和安全機制的深入知識
- 理解 C++ 中的非同步程式設計,包括 coroutines
- 利用 Boost.Asio 和 Boost.Cobalt 進行網路非同步程式設計
- 將經過驗證的效能和優化技術添加到您的工具箱中
- 瞭解如何測試和除錯非同步軟體

本書適合對象:
本書適合對 C++ 有一定經驗的開發者,無論其專業領域為何。如果您想提升您的 C++ 技能並學習如何使用最新的現代 C++ 特性開發高效能軟體,本書將非常適合您。

目錄:
- 平行程式設計範式
- 進程、執行緒和服務
- 如何在 C++ 中創建和管理執行緒
- 使用鎖進行執行緒同步
- 原子操作
- Promises 和 Futures
- Async 函數
- 使用 Coroutines 的非同步程式設計
- 使用 Boost.Asio 的非同步程式設計
- 使用 Boost.Cobalt 的 Coroutines
- 記錄和除錯非同步軟體
- 清理和測試非同步軟體
- 改善非同步軟體效能