ios-oc--Multithreading Rollup

Source: Internet
Author: User

GCD three types of queues:

1.The main queue: Same as the main thread function. In fact, the task that is submitted to the main queue executes in the main thread. The main queue can be obtained by calling Dispatch_get_main_queueu (). Because the main queue is associated with the main thread, this is a serial queue.

2.Global queues: The global queue is a concurrent queue and is shared by the entire process. There are three global queues in the process: High, Medium (default), low three priority to access the queue.

3. User queue: User queue (GCD does not call this queue, but does not have a specific name to describe the queue, so we call the user queue) is the function dispatch_queue_create the queue of the pieces. These queues are serial. Because of this, they can be used to complete the synchronization mechanism. A bit like a mutex in a traditional thread.

ios-oc--Multithreading Rollup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.