Slide 30
Slide 30 text
Rxの場合
val streamA = taskA().toObservable().share() // hot Observable化
val streamB = taskB().toObservable()
val streamC = streamA.zipWith(streamB) { a, b -> taskC(a, b) }
.flatMap { it.toObservable() }
val streamD = streamA.flatMap { task.D(it).toObservable() }
val streamE = streamC.zipWith(streamD) { c, d -> taskE(c, d) }
.flatMap { it.toObservable() }
streamE.subscribe { val result = it }
● taskAの結果が2箇所で使われるのでhot Observableにする必要がある
● operatorの関係で全体的にSingle -> Observableにしなければいけない
● 見た目がグロい