winRain
V2EX  ›  程序员

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

By winRain at 2021 年 6 月 23 日 · 1366 次点击

代码如下:

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

目前尚无回复
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
© 2026 V2EX · 32ms · 3.9.8.5