Skip to content

2.0.0

Compare
Choose a tag to compare
@akarnokd akarnokd released this 29 Oct 10:57
· 695 commits to 2.x since this release

Maven

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.NONE to MISSING

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() and Flowable.subscribeOn()
  • Pull 4761:
    • Unify MapNotification, Materialize, OnErrorReturn last element backpressure under the same helper class.
    • Reuse parts of FlowableSequenceEqual in FlowableSequenceEqualSingle.
  • 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()and Flowable.flatMapMaybe() termination detection
  • Pull 4747: distinctUntilChanged to store the selected key instead of the value
  • Pull 4751: fix Flowable.concatMapEager hang due to bad request management.
  • Pull 4761: Fix cancellation bugs in Flowable operators.
  • Pull 4763: rewrite of takeUntil to avoid onSubscribe() races.
  • Pull 4766:
    • Fix Flowable.skipUntil lifecycle and concurrency properties.
    • Fix Flowable.concatMapEager error management.
  • Pull 4770: allow subscribeOn to work with blocking create.