AFNetworking/AFNetworking — pull request #282 by steipete (2012-04-06 00:51:32+00:00)
Title: Use atomic updates instead of heavy locking

Also exposes isNetworkActivityIndicatorVisible which now is KVO observable.

Further, since Xcode 4.2, we don't need to define ivars that are synthesized via properties, so I cleaned this up too.

The setActivityCount: is pretty much dead code, unless someone tries to be smart using KVC, so we're still protecting our ivar here.

I also added some extra logic to check the decrementActivityCount against underflow (which you also had). Underflow is way more likely than an overflow, so I didn't add anything there.