Skip to content

Commit

Permalink
Remove Observable.Parallel
Browse files Browse the repository at this point in the history
see #1673
  • Loading branch information
benjchristensen committed Oct 2, 2014
1 parent e4101d6 commit 31e7bb6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 415 deletions.
46 changes: 0 additions & 46 deletions src/main/java/rx/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -5425,52 +5425,6 @@ public final Observable<T> onExceptionResumeNext(final Observable<? extends T> r
return lift(new OperatorOnExceptionResumeNextViaObservable<T>(resumeSequence));
}

/**
* Performs work on the source Observable in parallel by sharding it on a {@link Schedulers#computation()}
* {@link Scheduler}, and returns the resulting Observable.
* <p>
* <img width="640" height="475" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/parallel.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code parallel} operates by default on the {@code computation} {@link Scheduler}.</dd>
* </dl>
*
* @param f
* a {@link Func1} that applies Observable Operators to {@code Observable<T>} in parallel and
* returns an {@code Observable<R>}
* @return an Observable that emits the results of applying {@code f} to the items emitted by the source
* Observable
* @see <a href="https://github.com/ReactiveX/RxJava/wiki/Observable-Utility-Operators#parallel">RxJava wiki: parallel</a>
* @see <a href="http://www.grahamlea.com/2014/07/rxjava-threading-examples/">RxJava Threading Examples</a>
*/
public final <R> Observable<R> parallel(Func1<Observable<T>, Observable<R>> f) {
return parallel(f, Schedulers.computation());
}

/**
* Performs work on the source Observable<T> in parallel by sharding it on a {@link Scheduler}, and returns
* the resulting Observable.
* <p>
* <img width="640" height="475" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/parallel.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>you specify which {@link Scheduler} this operator will use</dd>
* </dl>
*
* @param f
* a {@link Func1} that applies Observable Operators to {@code Observable<T>} in parallel and
* returns an {@code Observable<R>}
* @param s
* a {@link Scheduler} to perform the work on
* @return an Observable that emits the results of applying {@code f} to the items emitted by the source
* Observable
* @see <a href="https://github.com/ReactiveX/RxJava/wiki/Observable-Utility-Operators#parallel">RxJava wiki: parallel</a>
* @see <a href="http://www.grahamlea.com/2014/07/rxjava-threading-examples/">RxJava Threading Examples</a>
*/
public final <R> Observable<R> parallel(final Func1<Observable<T>, Observable<R>> f, final Scheduler s) {
return lift(new OperatorParallel<T, R>(f, s));
}

/**
* Returns a {@link ConnectableObservable}, which waits until its
* {@link ConnectableObservable#connect connect} method is called before it begins emitting items to those
Expand Down
141 changes: 0 additions & 141 deletions src/main/java/rx/internal/operators/OperatorParallel.java

This file was deleted.

Loading

2 comments on commit 31e7bb6

@christopherperry
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this pulled?

@benjchristensen
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reasons were explained in #1673

It is used wrong in almost all cases and it serves a very limited use case. What most were trying to accomplish with this was not what it did.

Please sign in to comment.