Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Six Essential Tips For Async - Introduction

5 minutes, 31 seconds


Right click “Save as…”

Async involves some new concepts. They're not difficult; just unfamiliar. Over the past year Lucian Wischik has been watching how people use async/await in C# and VB. This series distils out the three top async patterns and anti-patterns, and top three tips for writing your own async libraries.


  1. Async void is for top-level event-handlers only, and event-like things. Don't use it elsewhere in your code.
  2. It's crucial to distinguish CPU-bound work (should be done on threadpool) from IO-bound work (which needn't).
  3. Async library methods should have chunky async APIs not chatty. But if chatty is unavoidable, know about these micro-optimizations to reduce heap allocation overheads.
  4. Async library methods should consider task.ConfigureAwait(false) to reduce their impact on the UI message queue.
 If you understand the basic flow of control in an async method, then those three points all fall naturally into place. This first introduction video explains that control flow.
Slides and source code are available on Lucian's blog.


Follow the Discussion

Remove this comment

Remove this thread


Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.