Dispatch Group
Dispatch Group
A group of tasks that you monitor as a single unit.
Overview
Groups allow you to aggregate a set of tasks and synchronize behaviors on the group. You attach multiple blocks to a group and schedule them for asynchronous execution on the same queue or different queues. When all blocks finish executing, the group executes its completion handler. You can also wait synchronously for all blocks in the group to finish executing.
用于非dispatch_group_async(group, queue)方式添加的工作组任务;
Schedules a block object to be submitted to a queue when a group of previously submitted block objects have completed.
Waits synchronously for the previously submitted block objects to finish; returns if the blocks do not complete before the specified timeout period has elapsed.
Updating the Group Manually
dispatch_group_enter
Explicitly indicates that a block has entered the group.
dispatch_group_leave
Explicitly indicates that a block in the group finished executing.
https://developer.apple.com/documentation/dispatch/dispatch_group?language=occ
相关文章
- (二十四)mongodb中group的问题二
- transition-group
- MySQL · 捉虫动态 · Relay log 中 GTID group 完整性检测
- MySQL group_concat()详解
- SAP ERP的material type和group如何通过中间件下载
- SAP Hybris Discount group,折扣组,折扣记录,用户组几组概念的关联
- SQL GROUP BY 语句
- 理解 process.initgroups(user, extra_group)
- 思科端口聚合的命令是channel-group
- PAT 1109 Group Photo [Java]
- 对GROUP BY的增强
- MySQL ---- In aggregated query without GROUP BY, expression #2 of SELECT list contains nonaggregated