Synchronizing class methods in Objective-C
vombat.tumblr.com
vombat.tumblr.com
Personally, if I had to ensure synchronous calls to a class variable, I'd prefer to just restrict calls like this to a specific queue using dispatch_sync().
It is the class. But it's not the class in which the method is defined it's the class from which it is called.
So in one case it's the superclass and in the other case it's the subclass.
> The object passed to the @synchronized directive is a unique identifier used to distinguish the protected block
0 - https://developer.apple.com/library/mac/documentation/Darwin...