我想在短暂延迟后做点什么:
public void notifyMe() {
Single
.timer(500, TimeUnit.MILLISECONDS)
.subscribeOn(Schedulers.io())
.subscribe(ignore -> service.notifyMe()));
}
现在我有一个警告:"The result of subscribe is not used"
。
我该如何解决?
答案 0 :(得分:2)
A Single will only call once. Upon calling either method, the Single terminates and the subscription to it ends.
Link can be referred for more information.