Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Usage of @synchronized leads to app deadlock when firing multiple events in quick succession #63
Using synchronized only, without threading, also puts most or all of your code on the main thread. This contributed to about 15% of our main queue CPU usage. Addressing this would probably make a bunch of your clients happy.
Let me know if I can provide more info here.
I'd recommend using an NSOperationQueue with a maxConcurrentOperationCount of 1. You'll have to make sure that all your enqueueing, file IO (unarchiving/archiving), and networking is synchronized and off the main thread like this.
You might want to consider using a second synchronous queue for strictly networking operations. You'll probably need to keep your enqueuing and IO on the same operation queue.