SerialDispatchQueueScheduler

It would not be much different if you wanted to create your own dispatch queue. To demonstrate, we will create a custom dispatch queue using the DispatchQueue initializer that takes a label and attributes that can be used to specify the queue type. We will make it a concurrent queue, but this time we will create a serial dispatch queue scheduler with that queue, as shown:

let conQueue = DispatchQueue(label: "com.Navdeep.conQueue", attributes: .concurrent)let serScheduler = SerialDispatchQueueScheduler(queue: conQueue, internalSerialQueueName: "com.Navdeep.serQueue")

We would use a serial queue if we planned to do additional work on the same queue, and wanted to ensure that the work is carried out in the order ...

Get Reactive Programming with Swift 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.