I have a scenario, working on iPhone development.
I got 3 threads , 2 thread performs XML parsing operation and the last one verification operation.
How to run them sequentially.
Any help!.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You want to look at NSOperation and NSOperationQueue – when you have an NSOperation, you can call “addDependency” and that way the operation will not run until the other dependancies are complete.
Look for “Setting Dependencies” halfway down this document:
http://developer.apple.com/cocoa/managingconcurrency.html
Note that you can have an NSOperationQueue have more than one worker thread, so it could handle all of the XML parsing operations and the verification one.