Skip to content

Commit 3528e6a

Browse files
Merge pull request #1224 from daschl/toblocking
Implement shorter toBlocking as shorter alias for toBlockingObservable.
2 parents b56f0a5 + 5996b9d commit 3528e6a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7039,6 +7039,18 @@ public final BlockingObservable<T> toBlockingObservable() {
70397039
return BlockingObservable.from(this);
70407040
}
70417041

7042+
/**
7043+
* Converts an Observable into a {@link BlockingObservable} (an Observable with blocking operators).
7044+
*
7045+
* This method is an alias for {@link #toBlockingObservable()}.
7046+
*
7047+
* @return a {@code BlockingObservable} version of this Observable
7048+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Blocking-Observable-Operators">RxJava Wiki: Blocking Observable Observers</a>
7049+
*/
7050+
public final BlockingObservable<T> toBlocking() {
7051+
return toBlockingObservable();
7052+
}
7053+
70427054
/**
70437055
* Returns an Observable that emits a single item, a list composed of all the items emitted by the source
70447056
* Observable.

0 commit comments

Comments
 (0)