Creates a new dispatch queue to which you can submit blocks.
- iOS 4.0+
- macOS 10.6+
- tvOS 9.0+
- watchOS 2.0+
A string label to attach to the queue to uniquely identify it in debugging tools such as Instruments,
sample, stackshots, and crash reports. Because applications, libraries, and frameworks can all create their own dispatch queues, a reverse-DNS naming style (com.example.myqueue) is recommended. This parameter is optional and can be
The newly created dispatch queue.
Blocks submitted to a serial queue are executed one at a time in FIFO order. Note, however, that blocks submitted to independent queues may be executed concurrently with respect to each other. Blocks submitted to a concurrent queue are dequeued in FIFO order but may run concurrently if resources are available to do so.
If your app isn’t using ARC, you should call
dispatch on a dispatch queue when it’s no longer needed. Any pending blocks submitted to a queue hold a reference to that queue, so the queue is not deallocated until all pending blocks have completed.