C# Asynchronous Programming Full Tutorial : Async / Await / Task and Deadlock Fix by ConfigureAwait

preview_player
Показать описание
In this lecture video, I am going to explain #asynchronous #programming concepts when using .NET Core 7 with C# #programming language. I will code a #WPF application to demonstrate #Async, #Await, #ConfigureAwait, and #Task concepts while doing asynchronous coding. I will show how ConfigureAwait is important to prevent deadlocks while using "async" and "await" keywords.

The code repository of this lecture :

Moreover, we cover the following #howto topics:
* How to do asynchronous programming with C# and .NET
* How to use Async, Await and ConfigureAwait
* How to use Task, Task.Wait and ContinueWith
* How to utilize Dispatcher.BeginInvoke to update UI elements from different tasks, sub-tasks, threads
* How to utilize Thread.CurrentThread.ManagedThreadId to see which code is executed in which thread
* How to download source of a web page / URL asynchronously and properly with using HttpClient and Content.ReadAsStringAsync

0:00 Introduction Task, Async, Await and composing the demo application
2:18 Generating Async deadlock causing example
8:03 How to see thread IDs during the runtime
11:47 How to fix deadlock
13:50 How to use ConfigureAwait properly
14:48 How to make UI responsive with proper Async Await usage
17:09 How to make async but main thread blocking code with TaskFactory.StartNew and Task.Wait
20:52 How to make fully asynchronous and non-blocking UI with TaskFactory and ContinueWith
23:36 How to update UI thread from sub-thread with Dispatcher

We have manually corrected the subtitles for the video so watch the tutorial with subtitles on if you have a hard time understand

[1] Introduction to Programming Full Course with C# playlist

[2] Advanced Programming with C# Full Course Playlist

[3] Object Oriented Programming Full Course with C# playlist

[4] Asp #NETCore V5 - MVC Pattern - Bootstrap V5 - Responsive Web Programming with C# Full Course Playlist

[5] Artificial Intelligence (AI) and Machine Learning (ML) Full Course with C# Examples playlist

[6] Software Engineering Full Course playlist

[7] Security of Information Systems Full Course playlist

Рекомендации по теме
Комментарии
Автор

çok yararlı bi video olmuş elinize sağlık

lakalkgit
Автор

Hocam merhaba, ellerinize saglik.

Sizden bir ricam var. Butun WPF videolarinda cok cirkin ve demode GUIler var, QT videolarinda da oyle. Gunumuze uygun gorsellikte bir GUI Tutorial'i videosu cekerseniz gercekten fark yaratabileceginize inaniyorum! Tesekkurler simdiden.

BurakSaruhan
welcome to shbcf.ru