Tutorial :objective C sequential launching thread


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!.


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:


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.


If you want to run the process sequentially - just use one thread.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »