V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
winRain
V2EX  ›  程序员

doOnNext 中使用 subscribe() 难道不会阻塞吗?

  •  
  •   winRain · Jun 23, 2021 · 1060 views
    This topic created in 1780 days ago, the information mentioned may be changed or developed.

    代码如下:

    public Flux<Student> doSomething() {
        return this.rtpl.findAll(Student.class).doOnNext(student -> {
            Record rec = new Record();
            rec.setRecord(String.format("学生第 %s 次查成绩", count.addAndGet(1)));
            this.rtpl.insert(rec).subscribe();
        });
    }
    

    在使用 subscribe 的地方,idea 并没有阻塞的警告,是真的不会阻塞吗?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5225 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:47 · PVG 17:47 · LAX 02:47 · JFK 05:47
    ♥ Do have faith in what you're doing.