Dispatch: apply
2017-08-07 本文已影响41人
iwasee
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)")
})
}