dispatch_get_global_queue set flags = 1 , 崩溃

dispatch_get_global_queue set flags = 1 , the crash

- (void)viewDidLoad {
    [super viewDidLoad];

    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 1), ^{ 
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(listenNotification:) name:@"aysNofitication" object:nil];
    });
}

当我设置标志 1 时,代码会崩溃。

崩溃是:线程 1:EXC_BAD_ACCESS(代码=1,地址=0x50)

正如 Sermandurai Subbiah 所说,对于 dispatch_get_global_queue 的标志参数,您不应该使用 0 以外的任何其他内容。 The documentation for dispatch_get_global_queue 清楚地警告我们:

Flags that are reserved for future use. Always specify 0 for this parameter.