Best Practices for Using Async and Await, by Damir Arh

Best Practices for Using Async and Await, by Damir Arh

The async and await keywords have been a part of the C# programming language for a long time. In this talk, I will present some of the most common mistakes we can make when writing asynchronous code and show ways to avoid them.

The async and await keywords have been a part of the C# programming language for a long time. Despite that, they still hide traps that not only beginners but also more experienced developers occasionally fall into.

In this talk, I will present some of the most common mistakes we can make when writing asynchronous code and show ways to avoid them.

  • 0:00 - Introduction
  • 4:42 - Synchronous vs. asynchronous
  • 13:23 - async void breaks asynchronous code
  • 31:52 - Deadlocks
  • 42:18 - ConfigureAwait(false)
  • 49:50 - SynchronizationContext
  • 55:07 - Summary
  • 59:20 - Q&A

Code: https://github.com/damirarh/jbdnd-async-await

Speaker: Damir Arh, Microsoft MVP, Razum d.o.o.

Damir Arh has many years of experience with software development and maintenance; from complex enterprise software projects to modern consumer-oriented mobile applications. Although he has worked with a wide spectrum of different languages, his favorite language remains C#. In his drive towards better development processes, he is a proponent of test-driven development, continuous integration, and continuous deployment. He shares his knowledge by speaking at local user groups and conferences, blogging, and writing articles. He has received the prestigious Microsoft MVP award for developer technologies 9 times in a row.

Twitter: http://twitter.com/DamirArh/ Blog: https://www.damirscorner.com/

csharp programming developer

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

How long does it take to develop/build an app?

This article covers A-Z about the mobile and web app development process and answers your question on how long does it take to develop/build an app.

Developer Career Path: To Become a Team Lead or Stay a Developer?

For a developer, becoming a team leader can be a trap or open up opportunities for creating software. Two years ago, when I was a developer, ... by Oleg Sklyarov, Fullstack Developer at Skyeng company

Tracking a Developer’s Journey From Documentation Visit

Measuring website activity provides only half the story. See how to best track the developer's journey and what funnel stages makes sense for API-first products

IDO Development | Initial DEX Offering Development | IDO Development Platform

The IDO development platform is the new trendsetter in the blockchain world. Investors can make their investments worthy by exploring the benefits of Initial DEX Offering tokens since their value is soaring high in the marketplace.

Offshore Software Development - Best Practices

To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development.