Parallel Programming and Concurrency with C# 10 and .NET 6: A modern approach to building faster, more responsive, and asynchronous .NET applications
暫譯: 使用 C# 10 和 .NET 6 的平行程式設計與併發:現代化方法以構建更快速、更具響應性及非同步的 .NET 應用程式

Ashcraft, Alvin

  • 出版商: Packt Publishing
  • 出版日期: 2022-08-31
  • 售價: $1,610
  • 貴賓價: 9.5$1,530
  • 語言: 英文
  • 頁數: 320
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1803243678
  • ISBN-13: 9781803243672
  • 相關分類: .NETC#
  • 立即出貨 (庫存=1)

買這商品的人也買了...

商品描述

Leverage the latest parallel and concurrency features in .NET 6 when building your next application and explore the benefits and challenges of asynchrony, parallelism, and concurrency in .NET via practical examples

Key Features

- Learn to implement parallel programming and handle concurrency in .NET efficiently
- Switch threads while debugging and learn how to monitor specific threads in Visual Studio
- Discover how to cancel tasks with callbacks, by polling, or by using a task with wait handles

Book Description

.NET has included managed threading capabilities since the beginning, but early techniques had inherent risks: memory leaks, thread synchronization issues, and deadlocks. This book will help you avoid those pitfalls and leverage the modern constructs available in .NET 6 and C# 10, while providing recommendations on patterns and best practices for parallelism and concurrency. Parallel, concurrent, and asynchronous programming are part of every .NET application today, and it becomes imperative for modern developers to understand how to effectively use these techniques.

This book will teach intermediate-level .NET developers how to make their applications faster and more responsive with parallel programming and concurrency in .NET and C# with practical examples. The book starts with the essentials of multi-threaded .NET development and explores how the language and framework constructs have evolved along with .NET. You will later get to grips with the different options available today in .NET 6, followed by insights into best practices, debugging, and unit testing.

By the end of this book, you will have a deep understanding of why, when, and how to employ parallelism and concurrency in any .NET application.

What you will learn

- Prevent deadlocks and race conditions with managed threading
- Update Windows app UIs without causing exceptions
- Explore best practices for introducing asynchronous constructs to existing code
- Avoid pitfalls when introducing parallelism to your code
- Implement the producer-consumer pattern with Dataflow blocks
- Enforce data sorting when processing data in parallel and safely merge data from multiple sources
- Use concurrent collections that help synchronize data across threads
- Debug an everyday parallel app with the Parallel Stacks and Parallel Tasks windows

Who this book is for

This book is for beginner to intermediate-level .NET developers who want to employ the latest parallel and concurrency features in .NET when building their applications. Readers should have a solid understanding of the C# language and any version of the .NET Framework or .NET Core.

商品描述(中文翻譯)

在建立您的下一個應用程式時,利用 .NET 6 中最新的平行和併發特性,並通過實際範例探索非同步、平行和併發的好處與挑戰。

主要特點

- 學習如何有效地在 .NET 中實現平行程式設計和處理併發

- 在除錯時切換執行緒,並學習如何在 Visual Studio 中監控特定執行緒

- 探索如何通過回呼、輪詢或使用帶有等待處理的任務來取消任務

書籍描述

.NET 自始至終就包含了受管理的執行緒功能,但早期技術存在固有風險:記憶體洩漏、執行緒同步問題和死鎖。本書將幫助您避免這些陷阱,並利用 .NET 6 和 C# 10 中可用的現代結構,同時提供有關平行和併發的模式與最佳實踐的建議。平行、併發和非同步程式設計是當今每個 .NET 應用程式的一部分,現代開發人員必須了解如何有效使用這些技術。

本書將教導中級 .NET 開發人員如何通過平行程式設計和併發使他們的應用程式更快且更具響應性,並提供實際範例。書籍從多執行緒 .NET 開發的基本知識開始,探討語言和框架結構如何隨著 .NET 的演變而發展。您將隨後了解當今在 .NET 6 中可用的不同選項,並深入了解最佳實踐、除錯和單元測試。

在本書結束時,您將深入了解在任何 .NET 應用程式中為何、何時以及如何使用平行性和併發性。

您將學到什麼

- 使用受管理的執行緒防止死鎖和競爭條件

- 更新 Windows 應用程式的 UI 而不引發例外

- 探索將非同步結構引入現有代碼的最佳實踐

- 在將平行性引入代碼時避免陷阱

- 使用 Dataflow 區塊實現生產者-消費者模式

- 在平行處理數據時強制數據排序,並安全地合併來自多個來源的數據

- 使用幫助在執行緒之間同步數據的併發集合

- 使用平行堆疊和平行任務視窗除錯日常平行應用程式

本書適合誰

本書適合希望在建立應用程式時使用 .NET 中最新平行和併發特性的初學者到中級 .NET 開發人員。讀者應該對 C# 語言以及任何版本的 .NET Framework 或 .NET Core 有扎實的理解。

作者簡介

Alvin Ashcraft is a software engineer and developer community champion with over 25 years of experience in software development. Working primarily with Microsoft Windows, web, and cloud technologies, his career has focused primarily on the healthcare industry. He has been awarded as a Microsoft MVP 11 times, most recently as a Windows Dev MVP.

Alvin works in the Philadelphia area for Allscripts, a global healthcare software company, as a principal software engineer. He is also a board member of the TechBash Foundation, where he helps organize the annual TechBash developer conference. He has previously worked for companies such as Oracle, Genzeon, CSC, and ITG Pathfinders.

Originally from the Allentown, PA area, Alvin currently resides in West Grove, PA with his wife and three daughters.

作者簡介(中文翻譯)

Alvin Ashcraft 是一位軟體工程師及開發者社群的倡導者,擁有超過 25 年的軟體開發經驗。他主要專注於 Microsoft Windows、網頁及雲端技術,職業生涯主要集中在醫療保健產業。他曾 11 次獲得 Microsoft MVP 的榮譽,最近一次是作為 Windows Dev MVP。

Alvin 在費城地區的 Allscripts 工作,這是一家全球醫療保健軟體公司,擔任首席軟體工程師。他也是 TechBash 基金會的董事會成員,協助組織每年的 TechBash 開發者大會。他曾在 Oracle、Genzeon、CSC 和 ITG Pathfinders 等公司工作。

Alvin 來自賓夕法尼亞州的 Allentown 地區,目前與妻子和三位女兒居住在賓夕法尼亞州的 West Grove。

目錄大綱

1. Managed Threading Concepts
2. Evolution of Multi-Threaded Programming in .NET
3. Best Practices for Managed Threading
4. User Interface Responsiveness with Threading
5. Asynchronous Programming with C#
6. Parallel Programming Concepts
7. Task Parallel Library (TPL) and Dataflow
8. Parallel Data Structures and Parallel LINQ
9. Working with Concurrent Collections in .NET
10. Debugging Multi-Threaded Applications with Visual Studio
11. Cancelling Asynchronous Work
12. Unit Testing Async, Concurrent, and Parallel Code

目錄大綱(中文翻譯)

1. Managed Threading Concepts

2. Evolution of Multi-Threaded Programming in .NET

3. Best Practices for Managed Threading

4. User Interface Responsiveness with Threading

5. Asynchronous Programming with C#

6. Parallel Programming Concepts

7. Task Parallel Library (TPL) and Dataflow

8. Parallel Data Structures and Parallel LINQ

9. Working with Concurrent Collections in .NET

10. Debugging Multi-Threaded Applications with Visual Studio

11. Cancelling Asynchronous Work

12. Unit Testing Async, Concurrent, and Parallel Code