Getting results back (wait for all results) after firing async task
I think this is a very common scenario where a method would fire off several async tasks and then waits for result to result somewhere down the line.
var task1 = DoWorkAsync();
var task2 = DoMoreWorkAsync();
//then somewhere down the line
await Task.WhenAll(task1, task2);
Comments