Hot and cold observables

The preceding sections covered most of the factory operators available in RxPY. All of these operators start to emit items at subscription time. This is the default behavior in ReactiveX. Nothing happens until an observer subscribes to an observable. It is the subscription that makes the observable start emitting its items. This behavior is very important to understand when coding with ReactiveX, and it has a name: cold observables. Another behavior of observables is possible: hot observables.

So, what is the difference between cold and hot observables?

Cold and hot observables can be described as similar to the different ways of watching TV shows. Sometimes people watch TV shows on demand, and sometimes people watch ...

Get Hands-On Reactive Programming with Python 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.