I do not understand what you want to do in your code, but
- (id)methodThatReturnsSomething
{
@synchronized(self) {
}
return nil;
}
should have the same effect (delaying the return until the lock associated with it is released self), without warning the compiler.
But: what did you want to do? So you do not need to bet @synchronized.
source
share