-1

我遇到了这个代码:

       @synchronized (self.messageQueue) {
        [self.messageQueue insertObject:messageDictionaryRepresentation atIndex:0];
    }

我想请教这个语法(@synchronized)的用途是什么?谢谢。

4

1 回答 1

0

See Synchronization. You find that is "a convenient way to create mutex locks on the fly in Objective-C code". a related question is What does @synchronized() do?.

于 2013-02-24T12:10:17.957 回答