-
-
-
-
-
-
-
-
-
-
- dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
-
- dispatch_async(queue, ^{
-
- });
-
- dispatch_group_t queueGroup = dispatch_group_create();
-
- dispatch_group_async(queueGroup, queue, ^{
-
- });
-
-
-
-
-
-
-
- dispatch_group_notify(queueGroup, dispatch_get_main_queue(), ^{
-
- });
-
- dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-
- });
-
- dispatch_barrier_async(queue, ^{
-
- });
-
-
- dispatch_apply(5, queue, ^(size_t index) {
-
- });
-
-
-
-
-
- __block NSString *updateStr = @"1";
- dispatch_async(dispatch_get_main_queue(), ^{
- NSLog(@"迴歸主線程");
- updateStr = @"2";
- });
-
-
- int count = 10;
- for (int i = 0; i < count; i++) {
-
- }
- dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
- dispatch_apply(count, queue, ^(size_t i) {
-
- });
彙總的至關不錯,轉過來保存一下數組
原文地址:http://blog.csdn.net/like7xiaoben/article/details/25629365併發