Skip to content

Commit ac83ed9

Browse files
Make Parallel use NewThread until Computation Fixed
See #713 It was causing non-deterministic behavior, random test failures and poor performance.
1 parent 446acf5 commit ac83ed9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rxjava-core/src/main/java/rx/Observable.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5296,7 +5296,9 @@ public final Observable<T> onExceptionResumeNext(final Observable<? extends T> r
52965296
* @see <a href="https://github.com/Netflix/RxJava/wiki/Observable-Utility-Operators#wiki-parallel">RxJava Wiki: parallel()</a>
52975297
*/
52985298
public final <R> Observable<R> parallel(Func1<Observable<T>, Observable<R>> f) {
5299-
return lift(new OperatorParallel<T, R>(f, Schedulers.computation()));
5299+
// TODO move this back to Schedulers.computation() again once that is properly using eventloops
5300+
// see https://github.com/Netflix/RxJava/issues/713 for why this was changed
5301+
return lift(new OperatorParallel<T, R>(f, Schedulers.newThread()));
53005302
}
53015303

53025304
/**

0 commit comments

Comments
 (0)