Skip to content

Commit 025d3c4

Browse files
committed
Add toBlocking to RxScala and deprecate toBlockingObservable
1 parent d0c86cc commit 025d3c4

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

language-adaptors/rxjava-scala/src/main/scala/rx/lang/scala/Observable.scala

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2926,13 +2926,26 @@ trait Observable[+T]
29262926
}
29272927

29282928
/**
2929-
* Converts an Observable into a [[rx.lang.scala.observables.BlockingObservable]] (an Observable with blocking
2930-
* operators).
2929+
* Converts an Observable into a [[BlockingObservable]] (an Observable with blocking operators).
29312930
*
2931+
* @return a [[BlockingObservable]] version of this Observable
29322932
* @see <a href="https://github.com/Netflix/RxJava/wiki/Blocking-Observable-Operators">Blocking Observable Operators</a>
29332933
*/
2934+
@deprecated("Use `toBlocking` instead", "0.19")
29342935
def toBlockingObservable: BlockingObservable[T] = {
2935-
new BlockingObservable[T](asJavaObservable.toBlockingObservable)
2936+
new BlockingObservable[T](asJavaObservable.toBlocking)
2937+
}
2938+
2939+
/**
2940+
* Converts an Observable into a [[BlockingObservable]] (an Observable with blocking
2941+
* operators).
2942+
*
2943+
* @return a [[BlockingObservable]] version of this Observable
2944+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Blocking-Observable-Operators">Blocking Observable Operators</a>
2945+
* @since 0.19
2946+
*/
2947+
def toBlocking: BlockingObservable[T] = {
2948+
new BlockingObservable[T](asJavaObservable.toBlocking)
29362949
}
29372950

29382951
/**

0 commit comments

Comments
 (0)