zoukankan      html  css  js  c++  java
  • GCD

    All dispatch queues are first-in,first-out data structures.

    Types of dispatch queues:

    1. serial (as private dispatch queues)
    2. concurrent (as global dispatch queue)
    3. main dispatch queue

    Advantage:

    The most advantage is the simplicity of the work-queue programming model.Dispatch queues let you focus on the work you actually want to perfrom without having to worry about the threard creation and management. 

    Getting the global dispatch queue:

    The sysytem provides each application with three concurrent dispatch queues. These queues are global and are differentiated only by their priority level.

    1 dispatch_queue_t aQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);

    Creating serial dispatch queue:

    1 dispatch_queue_t queue;
    2 queue = dispatch_queue_create("com.example.MyQueue", NULL);


    Dispatch queues and other dispatch objects are reference-counted data types.

  • 相关阅读:
    vue 中使用阿里iconfont彩色图标
    团队作业九
    团队作业八
    团队作业七
    第二篇
    第三篇
    第一篇
    beta冲刺计划安排
    团队作业六
    团队作业五
  • 原文地址:https://www.cnblogs.com/wustlj/p/2335575.html
Copyright © 2011-2022 走看看