Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Ansh1234 opened this issue May 26, 2018 · 1 comment

Comments

@Ansh1234
Copy link

Ansh1234 commented May 26, 2018

`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.

@rkeazor
Copy link

rkeazor commented Aug 30, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants