LoginSignup
6
5

More than 5 years have passed since last update.

RxJava を Kotlin で利用する時に andThen や concatWith でラムダ式を使ってはいけない

Posted at

完全にハマりました。

RxJava (RxKotlin 含む) を Kotlin で利用している場合に、 Completable の andThenconcatWith でラムダ式を使用してはいけません。

ダメな例
Completable.complete()
        .andThen{ Completable.complete() }
        .test()
        .assertComplete()

この場合、このストリームは Complete しません。
ラムダ式を使用すると内部で emitter に emit されなくなってしまうようです。1

6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5