Hello all,
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!.
Hello all,
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!.
If you want to run the process sequentially - just use one thread.
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.