I came across some best practices for asynchronous programming using c#\'s async
/await
keywords (I\'m new to c# 5.0).
One of the advices gi
Another main point is that you should not block on Tasks, and use async all the way down to prevent deadlocks. Then it will be all asynchronous not synchronous blocking.
public async Task ActionAsync()
{
var data = await GetDataAsync();
return View(data);
}
private async Task GetDataAsync()
{
// a very simple async method
var result = await MyWebService.GetDataAsync();
return result.ToString();
}