RxJava 2 equivalent to isUnsubscribed

前端 未结 1 2048
轮回少年
轮回少年 2021-01-13 08:44

I\'ve been working through the examples in the book Reactive Programming with RxJava, which is targeted at version 1 not 2. An introduction to infinite streams has the follo

1条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-13 09:13

    After you subscribe to Observable, Disposable is returned. You can save it to your local variable and check disposable.isDisposed() to see if it still subscribing or not.

    0 讨论(0)
提交回复
热议问题