I thought per default you observe on the Thread wh...
# rx
m
I thought per default you observe on the Thread where you subscribe, but does the first function work, if the second doesn't?
m
How did you come to the conclusion that the first one doesn’t block?
And what is the thread calling these?
m
I thought blockingFirst() is calling subscribe internally
m
well, yes
both of your calls are blocking, which is why you’re able to assign the
val
m
but first method doesn't freeze my app, second one does
j
Because you are blocking the Main Thread, which is the UI Thread on Android.
m
Well, in the same sense you are blocking the main thread when assigning a value, like
val a = 0
Observable.fromArray(1,2,3,4).blockingFirst()
should complete instantly
m
what I want to ask is, why does the second method completely freezes the app?
m
It shouldn’t, and your snippet is probably not enough to debug this. I suggest posting a question on stackoverflow