I am working on an RSS Reader which uses ASIHTTPRequest to download asynchronously the posts for each feed.
During the initial run, lots of connections happen at once and it appears to freeze the UI even though I use a 3-MOC solution (private for writing -> main for UI -> private for data edition).
I wonder how I could limit the ASIHTTPRequest class to limit its number of simultaneous connections to ... 2 or 4 instead of (I saw it in the debugger) dozens at once.
Using an ASINetworkQueue you create yourself gives you more control over asynchronous requests. When using a queue, only a certain number of requests can run at the same time. If you add more requests than the queue’s maxConcurrentOperationCount property, requests will wait for others to finish before they start.
An example showing how to manage a queue with ASIHTTPRequest: