Skip to content

delay的疑惑 #2

@Alex-Cin

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的话,一切都不正常了;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions