I have some code as below:
foreach (var position in mAllPositions)
{
DoAsyncCall(position);
}
//I want to execute co
(NB, I am giving two separate answers; this takes a totally different approach than in the question.)
Following the code sample by Miguel Madero at this URL, use the Reactive Framework to wait in parallel for all the results to complete, then follow on with another task.
(There's other discussion in the same email chain, including a link to this closely related StackOverflow question.)