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

Popular posts from this blog

Solving Sonarqube :- Project was never analyzed. A regular analysis is required before a branch analysis

PySpark - Working with JDBC Sqlite database