To create your own dispatch queue with a unique name: Use the dispatch_queue_create function.
Discussion:
With GCD, you can create your own serial dispatch queue: We will use the dispatch_queue_create function to create a serial queue. This function
The first parameter is a C string (char *),It uniquely identifies the serial queue in the system. The reason why I stress the system is
This identifier is a full system identifierThis means that your APP has created a new serial queue with the serialQueue1 identifier, which is the same as the identifier of another APP, GCD cannot determine the result of creating a new serial queue with the same name. Because of this, Apple strongly recommends that you use
Identifier in Reverse DNS format, The reverse dns identifier is usually constructed in this way: com. COMPANY. PRODUCT. IDENTIFIER. For example, I can create two serial queues and name them respectively:
Com. pixolity. GCD. serialQueue1 com. pixolity. GCD. serialQueue2
After creating a serial queue, you can use various GCD functions to assign tasks to it. Once the self-created serial queue is used, you must use dispatch_release to release it. Example:
GCD10: use GCD to build your own dispatch queue