AFNetworking/AFNetworking — pull request #768 by jparise (2013-01-30 20:27:40+00:00)
Title: Serialize calls to responseJSON using a lock.

AFJSONRequestOperation's completion path calls `responseJSON` from a
processing queue. Because `responseJSON` "lazily" deserializes the
response data into a JSON object, it needs to be protected against
concurrent access from other queues (threads).

For example, `AFNetworkingOperationDidFinishNotification` is posted
when the operation finishes but perhaps before that processing queue
has finishing executing. Notification observers who also access
`responseJSON` end up in a race with that queue that often leads to a
crash.

We reuse the existing lock from our AFURLConnectionOperation base
class.