开发者

Objective C, Syncronized

开发者 https://www.devze.com 2023-02-16 10:35 出处:网络
@Syncronized(nodeMode.ne开发者_开发问答ighborNodeListeners) //neighborNodeListeners is NSMutalble array
 @Syncronized(nodeMode.ne开发者_开发问答ighborNodeListeners) //neighborNodeListeners is NSMutalble array

Lets say I set neighborNodeListeners as

 @property(retain) NSMutableArray *neighborNodeListeners

Do I still need the Syncronized block? "neighborNodeListeners" will be accessed by multiple threads


I think its not needed. Default property is atomic.

0

精彩评论

暂无评论...
验证码 换一张
取 消