
Parallel Programming and Concurrency with C# 10 and .NET 6
A modern approach to building faster, more responsive, and asynchronous .NET applications using C#
By: Alvin Ashcraft
eBook | 30 August 2022
At a Glance
ePUB
eBook
RRP $57.42
$51.99
or 4 interest-free payments of $13.00 with
orInstant Digital Delivery to your Kobo Reader App
Leverage the latest parallel and concurrency features in .NET 6 when building your next application. This book will showcase 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
- Learn how to switch threads while debugging and how to flag and unflag 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 always 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 efficiently 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. It then takes a deep dive into the different options available today in .NET 6, followed by some advice on best practices, debugging, and unit testing.
By the end of this book, you will have a deep understanding of why, when, and how to use parallelism and concurrency in any .NET application.
What you will learn
- Prevent deadlocks and race conditions with managed threading
- How to keep Windows application UIs updated without causing exceptions
- Best practices to follow when introducing asynchronous constructs to existing code
- Avoid common pitfalls when introducing parallelism to your code
- Implement the producer-consumer pattern with Dataflow blocks
- Enforce data sorting when manipulating data in parallel and safely merge data
- Use concurrent collections that help synchronize data across threads
- Debug an everyday parallel application 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 some version of the .NET Framework or .NET Core.
Table of Contents
- Managed Threading Concepts
- Evolution of Multi-Threaded Programming in .NET
- Best Practices for Managed Threading
- User Interface Responsiveness with Threading
- Asynchronous Programming with C#
- Parallel Programming Concepts
- Task Parallel Library (TPL) and Dataflow
- Parallel Data Structures and Parallel LINQ (PLINQ)
- Working with Concurrent Collections in .NET
- Debugging Multi-Threaded Applications with Visual Studio
- Cancelling Asynchronous Work
- Unit Testing Concurrent and Parallel Code
on
ISBN: 9781803240398
ISBN-10: 1803240393
Published: 30th August 2022
Format: ePUB
Language: English
Publisher: Packt Publishing
























