/AsyncCSharp

Learning repo - to try concepts around asynchronous programming

Primary LanguageC#MIT LicenseMIT

Source of the code and/or the ideas presented here:

Asynchronous programming with async and await

https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/?WT.mc_id=EducationalAdvancedCsharp-c9-niner

Code samples:

https://github.com/dotnet/docs/blob/main/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-starter/Program.cs

Relevant content that helped me go through this topic:

Introduction To Async, Await, And Tasks | C# 201 [5 of 8] - A short video by @Billwagner and @mika_dumont from Microsoft Team

https://www.youtube.com/watch?v=X9N5r6kMOxw

An On .NET show with @thecodetraveler (Brandon Minnick) sharing best practices of async/await

https://www.youtube.com/watch?v=My2gAv5Vrkk

Six Essential Tips For Async by Lucian Wischik

https://channel9.msdn.com/Series/Three-Essential-Tips-for-Async/Three-Essential-Tips-For-Async-Introduction

Tip 1: Async void is for top-level event-handlers only

https://channel9.msdn.com/Series/Three-Essential-Tips-for-Async/Tip-1-Async-void-is-for-top-level-event-handlers-only

Tip 2: Distinguish CPU-Bound work from IO-bound work

https://channel9.msdn.com/Series/Three-Essential-Tips-for-Async/Tip-2-Distinguish-CPU-Bound-work-from-IO-bound-work

Tip 3: Wrap events up in Task-returning APIs and await them

https://channel9.msdn.com/Series/Three-Essential-Tips-for-Async/Lucian03-TipsForAsyncThreadsAndDatabinding

Tip 4: Async Library Methods Shouldn't Lie

https://channel9.msdn.com/Series/Three-Essential-Tips-for-Async/Async-Library-Methods-Shouldn-t-Lie

Further content from Lucian Wischik:

https://docs.microsoft.com/en-us/archive/blogs/lucian/talk-async-best-practices