开发者

Loop through List(of Items) with each one being asynced downloaded

开发者 https://www.devze.com 2023-01-19 21:48 出处:网络
I have a list of object that i loop through, and in this loop i have an async webrequest that is getting a response from a site, according to the current object\'s data.

I have a list of object that i loop through, and in this loop i have an async webrequest that is getting a response from a site, according to the current object's data.

How can i wait for 开发者_开发技巧each async request to complete b4 going to the next object in the list? Should i use application.doevents?


In you async callback, kick off the next request when the current one completes. At that point you can also check if the cancel button was pressed and cancel the request if it was.

0

精彩评论

暂无评论...
验证码 换一张
取 消