iOS - 线程、队列

线程:

1.异步线程全局队列
 dispatch_async(dispatch_get_global_queue(0, 0), ^{
});
2.主线程
        dispatch_async(dispatch_get_main_queue(), ^{
 });

队列

1.串行队列
    dispatch_queue_t queue = dispatch_queue_create("tk.bourne.testQueue", DISPATCH_QUEUE_SERIAL);
    dispatch_async(queue, ^{
dispatch_async(queue, ^{
  });

你可能感兴趣的:(iOS - 线程、队列)