dispatch_apply将调度队列作为参数,它允许您选择要在哪个队列上执行block。我的理解是,Swift中的DispatchQueue.concurrentPerform是用来代替dispatch_apply的。但是这个函数没有将调度队列作为参数。谷歌搜索后,我发现thisGCDtutorial其中有这段代码:let_=DispatchQueue.global(qos:.userInitiated)DispatchQueue.concurrentPerform(iterations:addresses.count){indexin//doworkhere}并解释:Thisimp