We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
谷歌了下, ` semaphore = dispatch_semaphore_create(1);
//异步执行 dispatch_async(dispatch_get_global_queue(0, 0), ^{ //将数据 转换为 BMChineseSortModel NSMutableArray *sortModelArray = [NSMutableArray arrayWithCapacity:0]; [objectArray enumerateObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { BMChineseSortModel *model = [self getModelWithObj:obj key:key]; if (model) { //对 数组的插入操作 上锁 dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); [sortModelArray addObject:model]; dispatch_semaphore_signal(semaphore); } }];`
系统判断sema是否被使用的标志为sema被销毁时的值是否与初始化的值相同
The text was updated successfully, but these errors were encountered:
解决了吗,我也遇到相同问题
Sorry, something went wrong.
No branches or pull requests
谷歌了下,
` semaphore = dispatch_semaphore_create(1);
系统判断sema是否被使用的标志为sema被销毁时的值是否与初始化的值相同
The text was updated successfully, but these errors were encountered: