http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/Exceptions/Articles/ExceptionsAndCocoaFrameworks.html#//apple_ref/doc/uid/TP40009045-SW1 Relevant Quote: "The Cocoa frameworks are generally not exception-safe. The general pattern is that exceptions are reserved for programmer error only, and the program catching such an exception should quit soon afterwards." More discussion here: http://stackoverflow.com/questions/324284/how-to-throw-an-exception-in-objective-c-cocoa Given all this, prefer a crash on the background thread.
- Added a block object to reference self in the completion block - Added a pointer to the onceToken to be used in the completion block
- Added a line for setting _successCallbackQueue to NULL when releasing the call back queue in the setter - Added a line for setting _failureCallbackQueue to NULL when releasing the call back queue in the setter
So NSURLCacheStorgeNotAllowed has the value 2, which maps to NSURLRequestReturnCacheDataElseLoad. I'm not sure why this is here in the first place, but the correct enum is of the type NSURLRequestCachePolicy.
…ompletion blocks. - Added dispatch group property to AFHTTPRequestOperation - Modified all request objects to call dispatch_group_async in completion blocks - Added a dispatch semaphore for thread safety of the dispatch group property - Added dispatch_group_enter and dispatch_group_leave calls to ensure requests are always in the group until the completion block finishes. - Added an override for setCompletionBlock to call dispatch_group_leave so that subclasses do not need the call in each completion block. - Modified enqueueBatchOfHTTPRequestOperations to now dispatch_group_notify in the NSBlockOperation completion block
…ta-wrapped image data
See http://petersteinberger.com/blog/2012/dont-call-willchangevalueforkey/. I didn't remove the call in the AFNetworkActivityIndicatorManager, since I already removed this in my other pull request.