2.0.0
This is it, general availability of RxJava 2! Rewritten from scratch to offer better performance, lower overhead, more features, a modern underlying technology and interoperation with the Reactive-Streams ecosystem. Big thanks goes to the several dozen people who gave feedback, fixes, enhancements and reviewed pull requests in the past, very intensive, 4 months.
Users are encouraged to read the wiki articles What's different in 2.0 and Writing operators for 2.0 to get a overview about changes and differences between working with RxJava 1 and 2. If you find something missing or under-explained, don't worry and open an issue about it!
Some other common libraries such as RxAndroid and Retrofit 2 Adapter were already following the 2.x development and you can expect them to release versions supporting the 2.0.0 GA shortly. In addition, there is an ongoing effort to port companion libraries of RxJava itself to support the 2.x line. For now, several ported features are available as part of the RxJava2Extensions project. RxJava 1 and 2 can live side by side in the same project and the RxJava2Interop library allows dataflow conversions between the two versions.
The sections below contain the changes since 2.0.0-RC5 beyond the general quality and test coverage improvements of the codebase.
API enhancements
- Pull 4760: Add
Single.fromObservable(ObservableSource) - Pull 4767: Rename
BackpressureStrategy.NONEtoMISSING
Documentation enhancements
- Pull 4744: Fixed Javadoc for
Disposables.fromFuture - Pull 4749: New 2.x marble diagrams
- Pull 4752: Add more new marble diagrams & update old ones
Performance enhancements
- Pull 4742:
- cleanup
Flowable.publish()and enable operator fusion on its input - compact
Flowable.blockingSubscribe(),Observable.blockingSubscribe()andFlowable.subscribeOn()
- cleanup
- Pull 4761:
- Unify
MapNotification,Materialize,OnErrorReturnlast element backpressure under the same helper class. - Reuse parts of
FlowableSequenceEqualinFlowableSequenceEqualSingle.
- Unify
- Pull 4766:
Flowable.scan(T, BiFunction)now emits the initial value only when the upstream signals an event.
Bugfixes
- Pull 4742:
- Fix
Flowable.materialize()terminal signal emission in face of backpressure. - Fix
Flowable.onErrorReturn()terminal signal emission in face of backpressure. - fix
Flowable.flatMapSingle()andFlowable.flatMapMaybe()termination detection
- Fix
- Pull 4747:
distinctUntilChangedto store the selected key instead of the value - Pull 4751: fix
Flowable.concatMapEagerhang due to bad request management. - Pull 4761: Fix cancellation bugs in
Flowableoperators. - Pull 4763: rewrite of
takeUntilto avoidonSubscribe()races. - Pull 4766:
- Fix
Flowable.skipUntillifecycle and concurrency properties. - Fix
Flowable.concatMapEagererror management.
- Fix
- Pull 4770: allow
subscribeOnto work with blocking create.