V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
winRain
V2EX  ›  程序员

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

  •  
  •   winRain · 2021-06-23 15:39:48 +08:00 · 711 次点击
    这是一个创建于 1028 天前的主题,其中的信息可能已经有所发展或是发生改变。

    代码如下:

    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 并没有阻塞的警告,是真的不会阻塞吗?

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5018 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:53 · PVG 17:53 · LAX 02:53 · JFK 05:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.