AFNetworking/AFNetworking — pull request #410 by epatey (2012-07-11 01:56:33+00:00)
Title: Fix threading issue with AFNetworkActivityIndicatorManager.

AFNetworkActivityIndicatorManager still has a problem when decrementing from a background thread. The code intends to delay the hiding of the indicator to suppress flashing via a timer. The timer was added to the current run loop which, depending on the thread, will never fire.

The fix was trivial - put the timer on the mainRunLoop rather than the currentRunLoop.

I also made an additional fix to avoid an extra dispatch_async onto the main queue when responding to the timer - since the timer is already firing on the proper queue/thread.