Re: iOS - NSOperation/NSOperationQueue Question

2014-06-04 Thread Dave
Hi, Yes, the documentation is wrong or confusing at best, I’ve tried it, it doesn’t work. I think it’s meant for a number of operations that need to wait for the preceding operation to complete before the next one continues. I also wondered if the NSOperation “waitUntilFinished” method might wo

Re: iOS - NSOperation/NSOperationQueue Question

2014-06-03 Thread Jeffrey Robert Kelley
That’s not what the documentation says: > If YES, the current thread is blocked until all of the specified operations > finish executing. If NO, the operations are added to the queue and control > returns immediately to the caller. So, if you’re experiencing different behavior, I would say tha

Re: iOS - NSOperation/NSOperationQueue Question

2014-06-03 Thread Dave
I’ve tried that, addOperations:waitUntilFinished: waits for operations currently queued to finish before adding the current operation, it doesn’t Add it to the queue and then wait for it to complete which is what I want. Thanks Dave On 3 Jun 2014, at 19:26, Jeffrey Robert Kelley wrote: > I th

Re: iOS - NSOperation/NSOperationQueue Question

2014-06-03 Thread Jeffrey Robert Kelley
I think you’re looking for NSOperationQueue’s -addOperations:waitUntilFinished: method. Should do what you want. Jeff Kelley slauncha...@gmail.com | @SlaunchaMan | jeffkelley.org On Jun 3, 2014, at 5:51 AM, Dave wrote: > Hi, > > I think this has been covered before, but all the searches I’v

iOS - NSOperation/NSOperationQueue Question

2014-06-03 Thread Dave
Hi, I think this has been covered before, but all the searches I’ve done don’t really cover what I’d like to do. I have an API that has two modes of operation, Sync and Async. In Sync mode calls to the API MUST be on a background thread and the data is returned to the caller with a possibility