

#Combine booxter library code#
This type is useful for times that you want to be able to customize the scheduler used in some code from the outside, but you don't want to introduce a generic to make it customizable. The Combine framework ships with many type-erasing wrappers, such as AnySubscriber, AnyPublisher and An圜ancellable, yet for some reason does not ship with AnyScheduler. The AnyScheduler provides a type-erasing wrapper for the Scheduler protocol, which can be useful for being generic over many types of schedulers without needing to actually introduce a generic to your code. This library was designed over the course of many episodes on Point-Free, a video series exploring functional programming and Swift hosted by Brandon Williams and Stephen Celis. This library provides new schedulers that allow you to turn any asynchronous publisher into a synchronous one for ease of testing and debugging. However, the moment you use any of these schedulers in your reactive code you instantly make the publisher asynchronous and therefore much harder to test, forcing you to use expectations and waits for time to pass as your publisher executes. It unifies many disparate ways of executing work, such as DispatchQueue, RunLoop and OperationQueue.

The Combine framework provides the Scheduler protocol, which is a powerful abstraction for describing how and when units of work are executed. A few schedulers that make working with Combine more testable and more versatile.
