Join Scott Gardner for an in-depth discussion in this video Use Schedulers, part of Reactive Programming in iOS with RxSwift.
- [Voiceover] An observable and the operators you use on it,…will execute and notify observers on the same thread…in which the Subscribe operator is used.…So far, I've been doing all the work on the main thread.…Schedulers are an abstraction that…let you specify distinct queues on which to perform work.…It's always a good idea to move your intensive work…off the main thread to keep it snappy…and responsive for your users.…Schedulers make it easy to do this.…They can be Serial or Concurrent.…You would use a Serial scheduler if you want to ensure…work is carried out on that queue in the order…in which it is added to the queue.…
Otherwise, you would typically just use a Concurrent queue.…There are built-in scheduler types that work with…Grand Central Dispatch or GCD queues…and NS operation queues,…including Serial Dispatch Queue Scheduler,…which will dispatch work on a specified…Serial Dispatch queue.…Concurrent Dispatch Queue Scheduler, which will dispatch on…a specified Concurrent Dispatch queue,…And, Operation Queue Scheduler, which will perform work…
Learn reactive programming with Reactive Extensions for Swift and iOS by following along with author Scott Gardner. Scott introduces the Reactive Extensions libraries for Swift and Cocoa Touch, and shows how to work with observable sequences, bind user interface and data elements, perform networking operations, debug Rx code, and more.
- Using the Reactive Extensions library
- Working with observable sequences
- Binding UI and data elements
- Binding table and collection views
- Error handling