Hands-On Parallel Programming with C# 8 and .NET Core 3.0
4.1 (9 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
93 students enrolled

Hands-On Parallel Programming with C# 8 and .NET Core 3.0

Boost your .NET Core development with parallel programming concepts
4.1 (9 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
93 students enrolled
Created by Packt Publishing
Last updated 11/2019
English
English
Current price: $86.99 Original price: $124.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 1.5 hours on-demand video
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Apply the core concept of parallel programming in .NET Core
  • Build an application using Microsoft’s library for writing parallel code, Task Parallel Library (TPL)
  • Design parallel execution flows using Parallel LINQ (PLINQ)
  • Secure your parallel code from unexpected exceptions by applying efficient exception handling strategies
  • Create parallel code using data structures that were specifically built for parallel execution optimization
Course content
Expand all 21 lectures 01:26:42
+ Introduction to Parallel Programming in .NET Core
4 lectures 16:20

This video will give you an overview about the course.

Preview 02:17

In this video, we will understand what parallelism is, and how it is reflected in modern application development.

   •  Evaluate modern systems problems

   •  Propose parallelism of code as a solution

   •  Identify how hardware is supporting parallel development of applications

Introduction to Parallel Programming
03:40

This video gives a clear introduction to the concept of concurrent execution of code. For example, we will see the difference between parallel and async code structure.

   •  Specify the core difference between parallel and async

   •  Implement code in parallel and async way

   •  Spot similarities and differences in parallel and async execution flows

Parallel versus Async
08:09

In this video, we will see presentation of C# 8 and .NET Core 3.0. Then, we will see the .NET implementations structure. Finally, we will spot the similarity of .NET Core and .NET platform, in terms of code parallelism capabilities.

   •  Present new features of C# 8 and .NET Core 3.0

   •  Present the structure of different .NET framework implementations

   •  Spot the differences and similarities between .NET Core and .NET Full platform

.NET Core versus Full .NET Platform
02:14
Test Your Knowledge
3 questions
+ Running Code in Parallel with "Task Parallel Library (TPL)"
5 lectures 26:34

This video covers introduction of the Task concept with demo sample, of how tasks can be created and executed.

   •  Define Task Parallel Library

   •  Get introduced to different ways of creating a task

   •  Demonstration of different ways of creating a task

Preview 04:31

In this video, we shall see the clear introduction of the Facade concept, how this is different from the Task concept, and how they relate to each other.

   •  Specify the core Facade concept

   •  Demonstration of how to create and manipulate Facade tasks

   •  Spot some scenarios for using Facade tasks

Task versus Facade
05:58

This video covers several ways of Wait for an asynchronous task to be executed, including parallel cases.

   •  Grab a result back from an asynchronous task execution

   •  Explore several overloads of the .Wait() method

   •  Demonstration

Waiting for a Task
04:39

Here, a presentation will be made on different ways of looking and grabbing the result of asynchronous task execution, whether it results in value, or exception.

   •  Block ways of grabbing results from the task

   •  Introduce a Wait keyword

   •  Demonstration of the .Result property of Task object

Returning a Value from a Task
06:22

Introduction of tasks composition and several methods for continuation of task executions, including a demo of the .ContinueWith() method.

   •  Introduction to continuation functionality

   •  Several overload specifications for continuation of asynchronous code

   •  Demonstration of the of .ContinueWith() method

Composing Tasks
05:04
Test Your Knowledge
5 questions
+ Exceptions Handling in Parallel Code
3 lectures 15:13

This video covers concepts of exceptions handling in TPL-based code. Here, we will see how to handle them properly.

   •  AggregateExceptions demonstration

   •  Demonstration of reading the original exception based on AggregateException

   •  Handling exceptions of child tasks

Preview 07:08

In this video, we are going to see what the conditions for successful tasks cancellation are, and how to perform them.

   •  Specification task cancellation conditions

   •  Different ways of cancelling the task

   •  Demonstration of how cancellation works in practice

Cancelling a Task
05:20

In this video, we shall cover the importance of race condition in parallel programming.

   •  Understand the same with an example

   •  Demonstration of parallel programming

Race Condition
02:45
Test Your Knowledge
3 questions
+ Performing Parallel Operations with "Parallel LINQ" (PLINQ)
4 lectures 14:08

Sometimes the application requires some processing in the memory data. The parallelization might be involved to use all the capability of host machine, so as to help speed up queries processing.

   •  Explore PLINQ

   •  ParallelEnumerable Class introduction

   •  Demonstration of PLINQ specific methods

PLINQ and Its Applications
02:34

PLINQ is composed of several methods that replicate original LINQ to objects methods. Here, we will see them in action.

   •  AsParallel usage example

   •  Explore the degree of parallelism

   •  Learn about ordered versus unordered parallel queries

Common Scenarios
06:34

In some cases, PLINQ will slow down the code execution. In this video, we will learn how to measure the overall query execution time.

   •  Reasons why PLINQ might be slower

   •  Query execution time measurement demonstration

   •  Best practices

PLINQ Query Performance
02:38

PLINQ introduces complexity to the code, and might lead to the not-clear issues. Here, we will see how to avoid those issues, and the guidelines while developing the PLINQ code.

   •  Explore parallel is not always faster

   •  Avoid non-thread-safe methods

   •  Avoid unnecessary ordering

Identifying Potential Pitfalls
02:22
Test Your Knowledge
4 questions
+ Data Structures for Parallel Programming
5 lectures 14:27

In this video, we are going to introduce several parallel data structures.

   •  Overview of parallel data structures

   •  Get introduced to the System.Collection.Concurrent namespace

   •  Overview to the Lazy initialization classes

Purpose and Implementation of Data Structures
02:30

In this video, we shall see how the Concurrent dictionary can be useful for thread-safe usage of dictionary data structure of multi-threaded applications.

   •  Introduction of Concurrent dictionary

   •  Get a demonstration of Concurrent dictionary versus dictionary

   •  Main methods of Concurrent dictionary overview

Concurrent Dictionary
03:21

In this video, we shall see how Concurrent Queue and Concurrent stack can be used for low-level programming in C#. Here, we will see how to use the same.

   •  Explore the reasons why Concurrent Queue and Concurrent Stack are useful

   •  Demonstration of Concurrent Queue

   •  Demonstration of Concurrent Stack

Concurrent Queue and Concurrent Stack
02:14

Concurrent Bag is a structure with simple interface, to work with data in multi-threaded applications. In this video, we will see how to use it.

   •  Get an introduction to Concurrent Bag

   •  Get a demonstration of Concurrent Bag usage

   •  Get a summary of Concurrent Bag usage

Concurrent Bag
02:01

In this video, we shall understand the use of asynchronous streams and parallel programming in C# 8.

   •  Explore its advantages

   •  Explore its limitations

   •  Explore its applications

Async Streams in C# 8
04:21
Test Your Knowledge
4 questions
Requirements
  • Basic knowledge of C# and .NET Core is assumed.
Description

With the new industry standard of increasing the processing power of machines, the concept of parallel programming was introduced as well. Concurrency has always been considered a difficult task and not many developers are confident at writing concurrent code. This course will put an end to the myth and help you become a pro at writing thread-safe code.

This course—fully comprising the latest C#8 and .NET Core 3.0 updates—will introduce you to the concepts of parallel programming in .NET Core and teach you how to take advantage of the hardware. You’ll implement TPL and PLINQ to take the best advantage of a processor and boost the speed and performance of your .NET Core applications. You’ll also apply parallel programming to your data structures.

By the end of this course, you’ll be able to parallelize your code to increase its efficiency and distribute work across multiple processors.

About the Author

Anton Selin is an IT enthusiast and expert in the fields of software architecture, innovation, and IT management, with more than 10 years of experience in the industry. For the last four years, he has worked as a software architect. He has worked at many international companies building the most sophisticated products, and as an independent consultant helping startups to develop their ideas and bring them to life.

Who this course is for:
  • Developers and programmers who want to enhance the performance of their apps through parallel and concurrent programming will benefit from this course.