Schedulers
The RxCpp library has got a declarative threading mechanism, thanks to the robust scheduling subsystem packaged with it. From an Observable, data can be streamed through different paths along the change propagation graph. By giving hints to the Stream processing pipeline, we can schedule the execution of Operators and Observer methods in the same thread,different threads, or a background thread. This helps to capture the intent of the programmer much better.
The declarative scheduling model in RxCpp is possible because of the immutability of the Streams in an Operator's implementation. A Stream Operator takes an Observable as a parameter and returns a fresh Observable as the result. The input parameter is not mutated at all ( the behavior is implicitly expected from the Operator implementation). This helps in out-of-order execution. The scheduling subsystem of RxCpp contains the following constructs: ( specific to Rxcpp v2)
- Scheduler
- Worker
- Coordination
- Coordinator
- Schedulable
- TimeLine...