Tinku
Tinku

Reputation: 133

NSOperationQueue for synchronous upload

Am developing an iPad application which uploads bulk of files to the server synchronously. I would like to use NSOperationQueue to add each upload request into the queue and start processing the next request after receiving the response. How this can be done?

Upvotes: 0

Views: 1487

Answers (1)

user478681
user478681

Reputation: 8319

set maximum concurrent operation to 1 for NSOperationQueue by setMaxConcurrentOperationCount: call. In this case the queue will process next operation only if the previous one will be finished (i.e. in your case received the response).

Upvotes: 2

Related Questions