So… I wrote this test ``` val subject = P...
# rx
j
So… I wrote this test
Copy code
val subject = PublishSubject.create<String>()
        subject.startWith("")
                .flatMap { it -> Observable.just(it.hashCode()) }
                .doOnNext { it -> subject.onNext(it.toString()) }
                .take(10)
                .subscribe { it -> Log.d("testing the application", it.toString()) }
and this test
Copy code
val subject = PublishSubject.create<String>()
        subject.startWith("")
                .flatMap { it -> Observable.just(it.hashCode()).delay(100, TimeUnit.MILLISECONDS) }
                .doOnNext { it -> subject.onNext(it.toString()) }
                .take(10)
                .subscribe { it -> Log.d("testing the application", it.toString()) }
The only difference it the
.delay(100, TimeUnit.MILLISECONDS)
in the second… In the first the log is printed only once and in the second 10 times… could someone explain it to me ?