RXJava 2x取消订阅PublishSubject

时间:2017-06-14 12:29:14

标签: rx-java2 unsubscribe publishsubject

我试图将SELECT w.week, COUNT(*) AS total FROM (SELECT generate_series(min(DATE_TRUNC('week', created_at)), max(DATE_TRUNC('week', created_at)), interval '7 day' ) as week FROM reviews ) w LEFT JOIN "reviews" ON DATE_TRUNC('week', created_at) = w.week GROUP BY w.week ORDER BY w.week; 的示例从Rx v1x转换为v2x。我有以下内容,但是当我调用PublishSubject时,dispose()继续触发(正如基于示例所预期的那样),但输出也会继续打印到标准输出。原始示例向onNext()说明,但unsubscribe()

无法做到这一点

更新了完整代码以回复以下评论

Disposable

如何从主题中取消订阅观察者(例如,对于v2.x,v1x的this example是如何更改的?)

0 个答案:

没有答案