Isn't that exactly what threadpool does. You can queue up as many as you like and only the number of threads in the pool will run at any one time. When they finish the threads return to the pool. You can change the number of threadpool threads as required.
Another comment on the original post: You might want to think about using the one web client for the whole series of requests as that will save a lot of processing and memory usage. It is tricky though because you have to carefully manage what happens when one of the calls fails and you have to abort the client. Felix On 23/02/2012 10:57 a.m., Tomasz Cielecki wrote:
My thoughts about this are as follows. Investigate if your web requests can be done asynchronously. If that is possible you could do something along this road: -Have a queue with the 100 requests. -Start a background thread with that keeps an eye on how many requests are in progress -Inside the thread start the async requests one by one untill you have reached your limit. -When each of the requests call back update the status of how many requests are in progress. -End the whole thing when you are done processing.
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
