Skip to content

delay的疑惑 #2

Description

@Alex-Cin
Observable.just("Alex").delay(1000, TimeUnit.MILLISECONDS)
                .doOnSubscribe(new LiteConsumer<Disposable>() {
                    @Override
                    public void onNext(Disposable result) {
                        LogTrack.e("只有 这里 会执行");
                    }
                })
                .doOnTerminate(new Action() {
                    @Override
                    public void run() throws Exception {
                        LogTrack.e(" -- ");
                    }
                })
                .doFinally(new Action() {
                    @Override
                    public void run() throws Exception {
                        LogTrack.e("---");
                    }
                })
                .subscribe(new LiteObserver<String>() {
                    @Override
                    public void onNext(String result) {
                        LogTrack.e(result);
                    }
                });
如果 没有delay的话, 一切正常;
如果 有delay的话,一切都不正常了;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions