-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Closed
Description
The following program stops printing numbers around 511 where the expected behaviour is that it runs forever.
import java.util.concurrent.TimeUnit
import rx.lang.scala.Observable
import rx.lang.scala.schedulers.NewThreadScheduler
import scala.concurrent.duration.Duration
object CombineLatestTest {
def main(args: Array[String]) {
var left = Observable.timer(Duration(0, TimeUnit.MILLISECONDS), Duration(1, TimeUnit.MILLISECONDS))
left.observeOn(NewThreadScheduler()).doOnEach(println(_)).combineLatest(Observable.never).subscribe()
readLine()
}
}
Without the observeOn it works as expected.