Intro-To-RxJava icon indicating copy to clipboard operation
Intro-To-RxJava copied to clipboard

Observable.just() is a hot observable and not cold observable as mentioned in the doc.

Open Ansh1234 opened this issue 6 years ago • 1 comments

`fun main() { Observable.just(returnInt()) }

fun returnInt() : Int { println("inside return block") return 2; }`

Even without subscribing to the Observable.just(), it prints the statement, which means it is a hot observable and not a cold observable.

Ansh1234 avatar May 26 '18 08:05 Ansh1234

Observable.just is a cold observable, because the data is produced inside the observable and closed.

rkeazor avatar Aug 30 '19 13:08 rkeazor