Lazy Emissions

Get introduced to the intrinsic property of a cold Observable: laziness.

An intrinsic property of a cold Observable is that it is lazy. The underlying sequence is only computed and emitted on subscription time.

To demonstrate this, let’s look at another Observable creation method: .fromCallable().

Observable.fromCallable()

The Observable.fromCallable(Callable<? extends T> callable) method creates an Observable that, when subscribed to, invokes the function supplied and then emits the value returned by that function.

Constructing an Observable with .fromCallable() won’t actually do the work specified inside the Callable. All it does is ...