@Synchronize the writing queue makes thread safe?

前端 未结 0 405
日久生厌
日久生厌 2021-01-12 18:17
NSObject *token = [[NSObject alloc] init];
dispatch_async(dispatch_get_global_queue(0, 0), ^{
    while (1) {
        @synchronized (token) {
            array = [NS         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题