Closed alex-townsend closed 8 years ago
Would implementing
Observable.fromAsync()
with the callback-based view listeners in Android be functionally the same as theObservable.create()
withObservable.OnSubscribe<T>
method that RxBinding uses?
Yes. As a library we cannot use it because it's not a stable API though. It's great for use in applications though.
Are there potential performance or output differences between the two implementations?
No, they will be exactly the same in performance and function.
If this gets promoted to the regulären api: which backpressure Mode would be suitable for this library?
I would use NONE
in the library. It's the user's choice (via applying onBackpressureXxx
) if they want to add backpressure. By default, though, I wouldn't include any (which is what we do now with create()
).
RxJava 1.1.7 introduced
Observable.fromAsync()
to "... bridge the callback world with the reactive". Would implementingObservable.fromAsync()
with the callback-based view listeners in Android be functionally the same as theObservable.create()
withObservable.OnSubscribe<T>
method that RxBinding uses?Example
Observable.fromAsync()
vs TextViewTextOnSubscribeAre there potential performance or output differences between the two implementations?
Observable.fromAsnyc()
is still flagged asExperimental
as well.(was not sure whether to post this question to RxJava or RxBinding -- will move if this is out of place)