Observable.create vs Observable.fromAsync in RxJava

I understand that use is Observable.create not recommended in RxJava due to the lack of backpressure support. In this regard, I applied a new Observable.fromAsynccallback API for wrapping, since it handles backpressure with another, apparently the same behavior as Observable.create.

However, in these draft documents , it seems that the proposal is that exposing my created observable, as shown below, should solve this problem:

Observable<T> observable = Observable.create(onSubscribe).onBackpressureBuffer();

It is right? At what stage is the difference between the two operators? If this is not true, is there any justification for using .createover .fromAsync?

+4
source share
1

create RxJava , , . , , .

fromEmitter . . , - API .

: RxJava 1.2.6 fromEmitter.

+5

Source: https://habr.com/ru/post/1649498/


All Articles