Silverlight, dealing with Async calls

后端 未结 8 1224
走了就别回头了
走了就别回头了 2021-01-03 01:23

I have some code as below:

        foreach (var position in mAllPositions)
        {
                 DoAsyncCall(position);
        }
//I want to execute co         


        
8条回答
  •  一生所求
    2021-01-03 02:10

    (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.)

提交回复
热议问题