We use AFNetworking (https://github.com/AFNetworking/AFNetworking) in our app and NSOperationStack (https://github.com/nicklockwood/NSOperationStack) to set dependencies so that last operation gets priority over the rest in the queue (stack behavior). I am running into an issue when 'start' method of AFURLConnectionOperation gets called, but operation's 'isReady' method returns NO because of the dependencies. This makes 'start' exit immediately. After the very first attempt to start operation, 'start' method never gets called again, thus the operation never reaches isFinished state, never gets deleted from the queue and eventually operations like that jam the queue. I would appreciate any thought on this matter. Thank you!
More info: none of the operations got cancelled and i don't see any dependency circles in the queue. We use setLIFODependendenciesForOperation on existing operationQueue not changing AFNetworking code: [self.operationQueue setLIFODependendenciesForOperation:operation];
Update: Now, thinking more about it, is it possible to have zero dependencies at one point and having isReady return YES when NSOperationQueue decides that operation is ready, but, by the time, start() gets invoked the number of dependencies changes to 1 or more.