Thursday, May 16, 2013

[ios] the correct behavior of nsoperation waitUntilFinished


from network search: 
think you may have missed expectations for the behavior. If you are expecting the completionBlock to be fired beforewaitUntilFinished releases the control flow, then your expectations are out of alignment. The completion block is dispatched asynchronously back to the success/failure queue, so its not going to be triggered until the run loop spins.
What you can do instead is waitUntilFinished and then access the responsePropertyList and errorproperties of the operation instead of the completion block.

No comments: