Scheduler Singletons

There are a couple of Singleton schedulers that we can use for some common needs such as the following:

  • CurrentThreadScheduler
  • MainScheduler

CurrentThreadScheduler represents the current thread and is the default scheduler. The MainScheduler, on the other hand, represents the main thread and is typically used for all UI-related work.

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.