Udemy

C# Multithreading Basics

立即報名
  • 2,294 名學生
  • 更新於 10/2022
4.4
(28 個評分)
CTgoodjobs 嚴選優質課程,為職場人士提升競爭力。透過本站連結購買Udemy課程,本站將獲得推廣佣金,有助未來提供更多實用進修課程資訊給讀者。

課程資料

報名日期
全年招生
課程級別
學習模式
修業期
1 小時 45 分鐘
教學語言
英語
授課導師
Tom Liao
評分
4.4
(28 個評分)
2次瀏覽

課程簡介

C# Multithreading Basics

How to boost program performance with multithreading and concurrency techniques

I think that most of us programmers start developing applications in single threaded mode. Which means that tasks or actions defined in this application will be executed in a certain predefined sequence. But at some point, we need to start tasks simultaneously and to be completed asynchronously in order to save execution time and to boost up performance.

Here is an example. You need to compare the execution speed of two tasks. In a single threaded program you have to perform the speed measurement tasks one after another, then compare the time difference at the end of when both tasks are done. Let’s say Task A needs 30 seconds and Task B needs only 0.5 second. Therefore, if you start Task B after Task A, you won’t see Task B to be completed until Task A is finished.

If we do it in a multithreaded mode, then no matter which task first, we can always see Task B to be finished in 0.5 second while Task A is still running. And if we use the right multi-threading technique, Task A might not even need 30 seconds to run. This is the beauty of multi-threading programming.

For the time being, there are several multi-threading techniques available in C# and .Net. Including Thread, ThreadPool, Task, TaskFactory, Task Run, BackgroundWorker, async and await, Parallel.For/Parallel.ForEach… Wow! So overwhelming!

Don’t worry, this two-hour long course provides you a very good insight on when to use what. Topics that will be mainly covered including the followings:

  • Problems with single threaded application

  • Basics of mult-threading model of C#

  • The BackgroundWorker

  • Use Dispatcher to update UI in progress

  • Thread and ThreadPool

  • TPL (1) - Task. Run and Task. Factory

  • TPL (2) - async and await

  • TPL (3) - Parallel programming

And the sample being used in this course is quite interesting as well. We are going to compare the speed of concatenating a string 50,000 times by using a string type variable and a StringBuilder type variable, respectively. You will be surprised at the performance that they yield.

Even though this course just brings you the basic concept of .Net’s multithreading techniques, the codes introduced in this course should be useful enough in your real world projects. Hope you enjoy this course.

課程章節

  • 4 個章節
  • 15 堂課
  • 第 1 章 Introduction
  • 第 2 章 Single Threaded Application
  • 第 3 章 Multi-Threaded Application
  • 第 4 章 What's next?

課程內容

  • Learn concepts of different threading models
  • Learn how to avoid UI being blocked by codes
  • Run tasks in background using BackgroundWorkers
  • Update data to UI using Dispatcher and Data binding
  • Run tasks in multiple threads using Thread class
  • Run tasks in multiple threads using Task class
  • Run tasks asynchronously using async and await
  • Run lots of tasks concurrently using Parallel programming

此課程所涵蓋的技能


評價

  • B
    Bianca da Silva Longhi
    2.5

    Apesar de ser um curso básico, pensei que fosse ser mais completo. Em muitas partes do vídeo o instrutor copia e cola código.

  • M
    Mohammed Ishaq Jaweed
    5.0

    best explanation I like it.

  • C
    Christian Bourassa
    4.5

    Amazing

立即關注瀏覽更多

本網站使用Cookies來改善您的瀏覽體驗,請確定您同意及接受我們的私隱政策使用條款才繼續瀏覽。

我已閱讀及同意