Skip to content


Usage of @synchronized leads to app deadlock when firing multiple events in quick succession #63

paulshapiro opened this Issue · 2 comments

2 participants


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.


The stack ends up looking like this when it locks up.


this is accomplished currently with the serialQueue

@malectro malectro closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.