Parallel Programming with C# and .Net: Fundamentals of Concurrency and Asynchrony Behind Fast-Paced Applications
Sarcar, Vaskaran
相關主題
商品描述
If you need to understand concurrency, this book is your guide to the fundamentals behind the advanced software you seek to implement to achieve highly responsive and scalable code. Support for parallel computation is an essential part of concurrency. Concurrency is an advanced concept and solutions are not straightforward. Many developers have been burned by it and are still being burned by it. This book aims to simplify the concept for C# developers. It tries to simplify the concept using the Task Parallel Library (TPL), Concurrent Collections, Parallel LINQ (PLINQ), Asynchronous Programming Patterns, and related topics.
The book starts with an overview of TPL and discusses Tasks. Understanding these areas is necessary to learn the concepts that follow in the book. You will go through special scenarios, such as handling exceptions and cancellations, followed by demonstrations of synchronization techniques and concurrent collections. You will see demonstrations of parallel loops to speed up the computations. And you'll understand PLINQ in detail. Finally, you'll learn how to simplify asynchronous programming with async and await keywords is discussed.
The book contains "Q&A sessions", review questions, and exercises (in .NET 8 and C#12). After reading the book, you will be able to understand advanced concepts in parallel programming and implement them in your code.
What You Will Learn
- Understand concurrent and multi-threaded development
- Understand how some modern-day C# features can promote parallel programming
- Demonstrate the latest patterns for parallel development
Who This Book Is For
Developers familiar with C# but are absolute beginners for parallel programming.
商品描述(中文翻譯)
如果您需要了解並發性,本書將引導您掌握實現高度響應和可擴展代碼所需的先進軟體背後的基本原理。對於並行計算的支援是並發性的重要組成部分。並發性是一個高級概念,解決方案並不簡單。許多開發者曾因其而受挫,至今仍然如此。本書旨在為 C# 開發者簡化這一概念,並試圖通過使用任務並行庫(Task Parallel Library, TPL)、並發集合、並行 LINQ(PLINQ)、非同步程式設計模式及相關主題來達成。
本書首先概述 TPL,並討論任務(Tasks)。理解這些領域對於學習書中後續的概念是必要的。您將經歷特殊情境,例如處理例外和取消,接著展示同步技術和並發集合的示範。您將看到並行迴圈的示範,以加速計算。您還將詳細了解 PLINQ。最後,您將學習如何使用 async 和 await 關鍵字簡化非同步程式設計。
本書包含「問答環節」、複習問題和練習(針對 .NET 8 和 C# 12)。閱讀本書後,您將能夠理解並行程式設計中的高級概念並將其實現於您的代碼中。
您將學到的內容:
- 理解並發和多執行緒開發
- 理解一些現代 C# 特性如何促進並行程式設計
- 展示最新的並行開發模式
本書適合對象:
熟悉 C# 的開發者,但對並行程式設計完全是初學者。
作者簡介
Vaskaran Sarcar obtained his Master of Engineering degree in Software Engineering from Jadavpur University, Kolkata (India), and an MCA from Vidyasagar University, Midnapore (India). He was a National Gate Scholar (2007-2009) and has over 12 years of experience in education and the IT industry. He devoted his early years (2005-2007) to the teaching profession at various engineering colleges, and later he joined HP India PPS R&D Hub in Bangalore. He worked there until August 2019 and became a Senior Software Engineer and Team Lead. After working for more than ten years at HP, he decided to follow his passion completely. He is now an independent full-time author.
作者簡介(中文翻譯)
Vaskaran Sarcar 取得了印度加爾各答的 Jadavpur University 的軟體工程碩士學位,以及印度 Midnapore 的 Vidyasagar University 的 MCA 學位。他曾是國家門檻獎學金得主(2007-2009),並在教育和資訊科技產業擁有超過 12 年的經驗。他在早期的幾年(2005-2007)專注於在各大工程學院的教學工作,之後加入了位於班加羅爾的 HP India PPS 研發中心。在那裡工作至 2019 年 8 月,他晉升為高級軟體工程師和團隊領導。在 HP 工作超過十年後,他決定全心追隨自己的熱情,現在是一名獨立的全職作家。