Swift知识搬运工
循环执行队列中的任务
DispatchQueue.global().async{
DispatchQueue.concurrentPerform(iterations:10, execute: { (index)in
print("Iteration times:\(index),Thread =\(Thread.current)")
})
}
Swift知识搬运工
循环执行队列中的任务
DispatchQueue.global().async{
DispatchQueue.concurrentPerform(iterations:10, execute: { (index)in
print("Iteration times:\(index),Thread =\(Thread.current)")
})
}
本文标题:Dispatch: apply
本文链接:https://www.haomeiwen.com/subject/vxxalxtx.html
网友评论