-(void)iteratorWithApply
{
//////////处理数组//////////
NSArray *arrayM = @[@"1",@"2",@"3",@"4"];
//获得全局并发队列
dispatch_queue_t queue = dispatch_get_global_queue(0, 0);
dispatch_apply(arrayM.count, queue, ^(size_t index) {
NSLog(@"%@--%@",arrayM[index],[NSThread currentThread]);
});
}
网友评论