We use the DispatchQueue initializer to create a new dispatch queue. The following code shows how we would create a new dispatch queue:
let concurrentQueue = DispatchQueue(label: "cqueue.hoffman.jon", attributes: .concurrent) let serialQueue = DispatchQueue(label: "squeue.hoffman.jon")
The first line would create a concurrent queue with the label of cqueue.hoffman.jon, while the second line would create a serial queue with the label of squeue.hoffman.jon.
The DispatchQueue initializer takes the following parameters:
- label: This is a string label that is attached to the queue to uniquely identify it in debugging tools, such as instruments and crash reports. It is recommended that we use a reverse DNS naming convention. This ...