We all now know that the following can cause a deadlock:
var result = myFunctionAsync().Result;
But what about:
var task = myFunctionAsync();
Task.WaitAll(task);
var result = task.Result;
Will this pattern prevent any deadlocks?
We all now know that the following can cause a deadlock:
var result = myFunctionAsync().Result;
But what about:
var task = myFunctionAsync();
Task.WaitAll(task);
var result = task.Result;
Will this pattern prevent any deadlocks?