× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS
Gary McLean Hall
Nov 16, 2016
<p>The `async` and `await` keywords in C# allow methods to run asynchronously. This can be used on the server-side to improve scalability and on the client-side to improve responsiveness.</p> <p>However, the implementation of asynchronous code is deceptively complex. Firstly, async and await affect <strong>all</strong> of your code throughout the callstack. This makes it difficult to introduce asynchronous operations in a piecemeal fashion. Also, choosing whether to capture the current synchronization context is dependent on a number of factors. Choosing wrongly can result in either a required context being unavailable or even a deadlock while mutually dependent resources wait for each other.</p> <p>If you have some async+await code that you would like to be reviewed, then do not hesitate to ask as I can guide you to the correct answer and provide detailed information about this feature of C#.</p>