Skip to content

Commit df0436c

Browse files
changes from review + scaladoc improvements
1 parent 2654f60 commit df0436c

File tree

4 files changed

+143
-145
lines changed

4 files changed

+143
-145
lines changed

language-adaptors/rxjava-scala/TODO.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ This is a (probably incomplete) list of what still needs to be done in the Scala
77
* Integrating Scala Futures: Should there be a common base interface for Futures and Observables? And if all subscribers of an Observable wrapping a Future unsubscribe, the Future should be cancelled, but Futures do not support cancellation.
88
* Add methods present in Scala collections library, but not in RxJava, e.g. aggregate à la Scala, collect, tails, ...
99
* combineLatest with arities > 2
10+
* Implicit schedulers?
1011
* Avoid text duplication in scaladoc using templates, add examples, distinction between use case signature and full signature
1112
* other small TODOs
1213

1314

15+
(Implicit) schedulers for interval: Options:
16+
17+
```scala
18+
def interval(duration: Duration)(implicit scheduler: Scheduler): Observable[Long]
19+
def interval(duration: Duration)(scheduler: Scheduler): Observable[Long]
20+
def interval(scheduler: Scheduler)(duration: Duration): Observable[Long]
21+
def interval(duration: Duration, scheduler: Scheduler): Observable[Long] && def interval(duration: Duration): Observable[Long]
22+
````

language-adaptors/rxjava-scala/src/examples/scala/rx/lang/scala/examples/RxScalaDemo.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -323,13 +323,13 @@ class RxScalaDemo extends JUnitSuite {
323323
.toBlockingObservable.foreach(println(_))
324324
}
325325

326-
// source Observables are in a List:
327-
@Test def zipManySeqExample() {
328-
val observables = List(Observable(1, 2), Observable(10, 20), Observable(100, 200))
329-
(for (seq <- Observable.zip(observables)) yield seq.mkString("(", ", ", ")"))
326+
// source Observables are all known:
327+
@Test def zip3Example() {
328+
val o = Observable.zip(Observable(1, 2), Observable(10, 20), Observable(100, 200))
329+
(for ((n1, n2, n3) <- o) yield s"$n1, $n2 and $n3")
330330
.toBlockingObservable.foreach(println(_))
331331
}
332-
332+
333333
// source Observables are in an Observable:
334334
@Test def zipManyObservableExample() {
335335
val observables = Observable(Observable(1, 2), Observable(10, 20), Observable(100, 200))
@@ -453,7 +453,7 @@ class RxScalaDemo extends JUnitSuite {
453453

454454
Thread.sleep(1500) // or convert to BlockingObservable
455455
}
456-
456+
457457
def output(s: String): Unit = println(s)
458458

459459
// blocks until obs has completed

0 commit comments

Comments
 (0)