
Hands-On Parallel Programming with C# 8 and .NET Core 3
Subscription
FREE
eBook + Subscription
$29.99
eBook
$35.99
Print + eBook
$48.99
What do you get with a Packt Subscription?
What do you get with a Packt Subscription?
What do you get with eBook + Subscription?
What do you get with a Packt Subscription?
What do you get with eBook?
What do I get with Print?
What do I get with Print?
What do you get with video?
What do you get with Audiobook?
Subscription
FREE
eBook + Subscription
$29.99
eBook
$35.99
Print + eBook
$48.99
What do you get with a Packt Subscription?
What do you get with a Packt Subscription?
What do you get with eBook + Subscription?
What do you get with a Packt Subscription?
What do you get with eBook?
What do I get with Print?
What do I get with Print?
What do you get with video?
What do you get with Audiobook?
-
Free ChapterSection 1: Fundamentals of Threading, Multitasking, and Asynchrony
-
Introduction to Parallel Programming
-
Task Parallelism
-
Implementing Data Parallelism
-
Using PLINQ
- Using PLINQ
- Technical requirements
- LINQ providers in .NET
- Writing PLINQ queries
- Preserving order in PLINQ while doing parallel executions
- Merge options in PLINQ
- Throwing and handling exceptions with PLINQ
- Combining parallel and sequential LINQ queries
- Canceling PLINQ queries
- Disadvantages of parallel programming with PLINQ
- Understanding the factors that affect the performance of PLINQ (speedups)
- Summary
- Questions
-
Section 2: Data Structures that Support Parallelism in .NET Core
-
Synchronization Primitives
-
Using Concurrent Collections
-
Improving Performance with Lazy Initialization
- Improving Performance with Lazy Initialization
- Technical requirements
- Introducing lazy initialization concepts
- Introducing System.Lazy<T>
- Handling exceptions with the lazy initialization pattern
- Lazy initialization with thread-local storage
- Reducing the overhead with lazy initializations
- Summary
- Questions
-
Section 3: Asynchronous Programming Using C#
-
Introduction to Asynchronous Programming
-
Async, Await, and Task-Based Asynchronous Programming Basics
- Async, Await, and Task-Based Asynchronous Programming Basics
- Technical requirements
- Introducing async and await
- Async delegates and lambda expressions
- Task-based asynchronous patterns
- Exception handling with async code
- Async with PLINQ
- Measuring the performance of async code
- Guidelines for using async code
- Summary
- Questions
-
Section 4: Debugging, Diagnostics, and Unit Testing for Async Code
-
Debugging Tasks Using Visual Studio
-
Writing Unit Test Cases for Parallel and Asynchronous Code
- Writing Unit Test Cases for Parallel and Asynchronous Code
- Technical requirements
- Unit testing with .NET Core
- Understanding the problems with writing unit test cases for async code
- Writing unit test cases for parallel and async code
- Mocking the setup for async code using Moq
- Testing tools
- Summary
- Questions
- Further reading
-
Section 5: Parallel Programming Feature Additions to .NET Core
-
IIS and Kestrel in ASP.NET Core
-
Patterns in Parallel Programming
-
Distributed Memory Management
- Distributed Memory Management
- Technical requirements
- Introduction to distributed systems
- Shared versus distributed memory model
- Types of communication network
- Properties of communication networks
- Exploring topologies
- Programming distributed memory machines using message passing
- Collectives
- Summary
- Questions
-
Assessments
- Assessments
- Chapter 1 – Introduction to Parallel Programming
- Chapter 3 – Implementing Data Parallelism
- Chapter 4 – Using PLINQ
- Chapter 5 – Synchronization Primitives
- Chapter 6 – Using Concurrent Collections
- Chapter 7 – Improving Performance with Lazy Initialization
- Chapter 8 – Introduction to Asynchronous Programming
- Chapter 9 – Async, Await, and Task-Based Asynchronous Programming Basics
- Chapter 10 – Debugging Tasks Using Visual Studio
- Chapter 11 – Writing Unit Test Cases for Parallel and Asynchronous Code
- Chapter 12 – IIS and Kestrel in ASP.NET Core
- Chapter 13 – Patterns in Parallel Programming
- Chapter 14 – Distributed Memory Management
-
Other Books You May Enjoy
About this book
In today’s world, every CPU has a multi-core processor. However, unless your application has implemented parallel programming, it will fail to utilize the hardware’s full processing capacity. This book will show you how to write modern software on the optimized and high-performing .NET Core 3 framework using C# 8.
Hands-On Parallel Programming with C# 8 and .NET Core 3 covers how to build multithreaded, concurrent, and optimized applications that harness the power of multi-core processors. Once you’ve understood the fundamentals of threading and concurrency, you’ll gain insights into the data structure in .NET Core that supports parallelism. The book will then help you perform asynchronous programming in C# and diagnose and debug parallel code effectively. You’ll also get to grips with the new Kestrel server and understand the difference between the IIS and Kestrel operating models. Finally, you’ll learn best practices such as test-driven development, and run unit tests on your parallel code.
By the end of the book, you’ll have developed a deep understanding of the core concepts of concurrency and asynchrony to create responsive applications that are not CPU-intensive.
- Publication date:
- December 2019
- Publisher
- Packt
- Pages
- 346
- ISBN
- 9781789132410
Latest Reviews
(2 reviews total)