Skip to content

Releases: ReactiveX/RxJava

1.2.6

03 Feb 08:28

Choose a tag to compare

Maven

Documentation

  • Pull 5000: Add which are the other stardard methods of create
  • Pull 5007: update sample(time) diagram to indicate emission of last
  • Pull 5048: Improve the javadoc of BehaviorSubject

Bugfixes

  • Pull 5030: fix groupBy consuming the upstream in an unbounded manner

2.0.5

27 Jan 08:13

Choose a tag to compare

Maven

The most notable enhancement of this version is the inclusion of the ParallelFlowable API that allows parallel execution of a few select operators such as map, filter, concatMap, flatMap, collect, reduce and so on. Note that is a parallel mode for Flowable (a sub-domain specific language) instead of a new reactive base type.

Consequently, several typical operators such as take, skip and many others are not available and there is no ParallelObservable because backpressure is essential in not flooding the internal queues of the parallel operators as by expectation, we want to go parallel because the processing of the data is slow on one thread.

The easiest way of entering the parallel world is by using Flowable.parallel:

ParallelFlowable<Integer> source = Flowable.range(1, 1000).parallel();

By default, the parallelism level is set to the number of available CPUs (Runtime.getRuntime().availableProcessors()) and the prefetch amount from the sequential source is set to Flowable.bufferSize() (128). Both can be specified via overloads of parallel().

ParallelFlowable follows the same principles of parametric asynchrony as Flowable does, therefore, parallel() on itself doesn't introduce the asynchronous consumption of the sequential source but only prepares the parallel flow; the asynchrony is defined via the runOn(Scheduler) operator.

ParallelFlowable<Integer> psource = source.runOn(Schedulers.io());

The parallelism level (ParallelFlowable.parallelism()) doesn't have to match the parallelism level of the Scheduler. The runOn operator will use as many Scheduler.Worker instances as defined by the parallelized source. This allows ParallelFlowable to work for CPU intensive tasks via Schedulers.computation(), blocking/IO bound tasks through Schedulers.io() and unit testing via TestScheduler. You can specify the prefetch amount on runOn as well.

Once the necessary parallel operations have been applied, you can return to the sequential Flowable via the ParallelFlowable.sequential() operator.

Flowable<Integer> result = psource.filter(v -> v % 3 == 0).map(v -> v * v).sequential();

Note that sequential doesn't guarantee any ordering between values flowing through the parallel operators.

For further details, please visit the wiki page about Parallel flows. (New content will be added there as time permits.)

API enhancements

  • Pull 4955: add sample() overload that can emit the very last buffered item.
  • Pull 4966: add strict() operator for strong Reactive-Streams conformance
  • Pull 4967: add subjects for Single, Maybe and Completable
  • Pull 4972: Improve compose() generics
  • Pull 4973: Add Completable.hide()
  • Pull 4974: add Flowable.parallel() and parallel operators
  • Pull 5002: Add scheduler creation factories

Bugfixes

  • Pull 4957: fix LambdaObserver calling dispose when terminating
  • Pull 4962: fix takeUntil() other triggering twice
  • Pull 4970: fix withLatestFrom null checks, lifecycle
  • Pull 4982: fix Observable.concatMapEager bad logic for immediate scalars.
  • Pull 4984: fix cross-boundary invalid fusion with observeOn, flatMap & zip
  • Pull 4987: Make Observable.combineLatest consistent with Flowable, fix early termination cancelling the other sources and document empty source case
  • Pull 4992: A.flatMapB to eagerly check for cancellations before subscribing
  • Pull 5005: ExecutorScheduler.scheduleDirect to report isDisposed on task completion

Other

  • Pull 4971: Add @CheckReturnValue to create() methods of Subjects + Processors
  • Pull 4980: Update Copyright to 'RxJava Contributors'
  • Pull 4990: Update marble diagrams for sample() overloads, Maybe and Maybe.switchIfEmpty()
  • Pull 5015: Fix Reactive-Streams dependency to be compile in the library's POM
  • Pull 5020: option to fail for using blockingX on the computation/single scheduler

1.2.5

06 Jan 12:00

Choose a tag to compare

Maven

Documentation

  • Pull 4963: Add missing marbles, fix image sizes

Bugfixes

  • Pull 4941: Fix Completable.mergeDelayError to check unsafe availability

2.0.4

04 Jan 09:08

Choose a tag to compare

Maven

API enhancements

Bugfixes

  • Pull 4927: fix timer() IllegalStateException due to bad resource management
  • Pull 4932: Add safeguards to generate()
  • Pull 4943: Fix publish(Function) not replenishing its internal queue
  • Pull 4945: Fix timeout with fallback not cancelling/disposing the main source connection.

2.0.3

18 Dec 09:26

Choose a tag to compare

Maven

Bugfixes

  • Pull 4899: FlowableScanSeed - prevent post-terminal events
  • Pull 4901: FlowableScan - prevent multiple terminal emissions
  • Pull 4903: doAfterNext - prevent post-terminal emission
  • Pull 4904: Observable.scan no seed fix post-terminal behaviour
  • Pull 4911: fix & update Observable.repeatWhen and retryWhen
  • Pull 4924: flatMapCompletable change Completable to CompletableSource

Other

  • Pull 4907: Use t instead of value to allow for IDE naming

1.2.4

15 Dec 11:56

Choose a tag to compare

Maven

Other

  • Pull 4912: Fix resolveAndroidApiVersion when running under Robolectric
  • Pull 4908: Use t instead of value to allow for IDE naming.
  • Pull 4884: enable TestScheduler with nanosecond periodic scheduling

2.0.2

02 Dec 10:47

Choose a tag to compare

Maven

API enhancements

  • Pull 4858: add Maybe.flatMapSingleElement returning Maybe
  • Pull 4881: Add @CheckReturnValue annotation to aid static verification tools

Performance enhancements

  • Pull 4885: Dedicated reduce() op implementations

Bugfixes

  • Pull 4873: TestObserver shouldn't clear the upstream disposable on terminated
  • Pull 4877: Apply missing RxJavaPlugins.onAssembly on ops
  • Commit bf0c: Fix firstOrError converted back to Observable/Flowable not reporting NoSuchElementException.

1.2.3

23 Nov 08:49

Choose a tag to compare

Maven

Documentation enhancements

  • Pull 4846: Specify the system parameters configuring the schedulers in the Schedulers javadoc.

API enhancements

  • Pull 4777: add AssertableSubscriber to provide method chained version of TestSubscriber and support a test() method on the base reactive classes.
  • Pull 4851: add Single.fromEmitter
  • Pull 4852: Single.takeUntil CancellationException message enhancements

Performance enhancements

  • Pull 4846: remove ObjectPool, code style cleanups

Bugfixes

  • Pull 4826: Schedule.when() bug fix
  • Pull 4830: Completable.doAfterTerminate to run after onError as well.
  • Pull 4841: replace non-serializable value of OnNextValue with its toString.
  • Pull 4849: fix Completable.concat & merge hanging in async situations.

2.0.1

12 Nov 09:00

Choose a tag to compare

Maven

API enhancements

  • Pull 4827: Porting the Scheduler.when operator from 1.x to 2.x
  • Pull 4831: add Flowable.doFinally(Action) for handling post-terminal or cancel cleanup.
  • Pull 4832: add doFinally to the rest of the reactive base classes
  • Pull 4833: add Flowable.doAfterNext operator
  • Pull 4835: add Observable.doAfterNext and {Single|Maybe}.doAfterSuccess.
  • Pull 4838: add fluent TestSubscriber.requestMore

Documentation fixes/enhancements

  • Pull 4793: Fix javadoc mentioning IllegalArgumentException instead of NullPointerException for calling with null parameter(s).
  • Pull 4798: Fix Observable.toFlowable documentation
  • Pull 4803: Fix ObservableEmitter mentioning FlowableEmitter.
  • Pull 4810: Fix Completable.retryWhen terminology about signal emission.
  • Pull 4815: Fix typo in javadoc of Maybe.toSingle
  • Pull 4839: fix wording of some operators, remove @throws implications

Bugfixes

  • Pull 4783: Fix Observable.repeatWhen & retryWhen not disposing the inner.
  • Pull 4819: Fix Observable.repeatWhen not reacting to upstream onError properly.

1.2.2

03 Nov 09:14

Choose a tag to compare

Maven

Note that the interface Cancellable has been moved to rx.functions affecting CompletableEmitter and the experimental Observable.fromEmitter(Action1<AsyncEmitter<T>> emitter, AsyncEmitter.BackpressureMode backpressure) has been removed.

Another important clarification was added to the javadoc about using SingleSubscriber: due to the internal enhancements of Single, a SingleSubscriber is no longer wrapped into a Subscriber+SafeSubscriber which setup used to call unsubscribe on the SingleSubscriber yielding isUnsubscribed() == true when the source terminated. Therefore, when one extends the class SingleSubscriber, the unsubscribe() should be called manually to yield the given expecation mentioned before:

Subscritpion s = Single.just(1).subscribe(new SingleSubscriber<Integer>() {
    @Override public void onSuccess(Integer t) {
        System.out.println("Success");
        unsubscribe();
    }

    @Override public void onError(Throwable e) {
        e.printStackTrace();
        unsubscribe();
    }
});

assertTrue(s.isUnsubscribed());

Documentation enhancements

  • Pull 4693: improve timer javadoc
  • Pull 4769: Add note to SingleSubscriber doc about unsubscribe invocation in onSuccess and onError.

API enhancements

Performance enhancements

  • Pull 4676: Make identity function a singleton.
  • Pull 4764: zip - check local boolean before volatile in boolean and

Bugfixes

  • Pull 4716: fixsubscribe(Action1 [, Action1]) to report isUnsubscribed true after the callbacks were invoked
  • Pull 4740: Error when tracking exception with unknown cause
  • Pull 4791: Add null check to Observable.switchIfEmpty