In Objective-C, you can declare a block as being synchronized on some object by using the @synchronized
construct. It would look something like this:
@synchronized (self) {
// Do something useful
}
However, I'm curious what exactly self
is referring to when you have a static method (+
instead of -
). I tried looking through the Apple docs, and they allude to it being OK, but don't really explain it. I know it works, I'm just curious what it means.