IPhoneOfASINetworkQueue asynchronous queueIs the content to be introduced in this article, using NSOperationQueue (orASINetWorkQueue, See the following example. When a queue is used, only a specified number of requests can be run simultaneously. If the request you added exceeds the maxConcurrentOperationCount attribute of the queue, the request will run after other requests are completed.
Note:ASINetworkQueueClass View introduction to the previous IPhone ASIHTTPRequest
- // ASINetworkQueue queue = [ASINetworkQueue alloc] init];
-
- For (ForumItem * item in itemList)
-
- {
-
- // Address of the item. Image
-
- If (item. Image)
-
- {
-
- ASIHTTPRequest * request = [ASIHTTPRequest requestWithURL: [NSURLURLWithString: item. Image];
-
- Request. userInfo = [NSDictionary dictionaryWithObject: item. ImageforKey: @ "Image"];
-
- [Request setDelegate: self];
-
- [Request setDidFinishSelector: @ selector (requestDidFinished :)];
-
- [Queue addOperation: request];
-
- }
-
- }
-
- [Queue go];
Release Notes
- queue
Summary:IPhoneOfASINetworkQueue asynchronous queueI hope this article will help you!