챕터10의 Example10_3.java 의 코드가 책 내용과 다른 부분이 있는 것 같네요
@Slf4j
public class Example10_3 {
public static void main(String[] args) throws InterruptedException {
Flux.fromArray(new Integer[]{1, 3, 5, 7, 9, 11, 13, 15, 17, 19})
.parallel()
.runOn(Schedulers.parallel())
.subscribe(data -> log.info("# onNext: {}", data));
Thread.sleep(100L);
}
}
@Slf4j
public class Example10_3 {
public static void main(String[] args) throws InterruptedException {
Flux.fromArray(new Integer[]{1, 3, 5, 7, 9, 11, 13, 15, 17, 19})
.parallel(4) // <- Example10_4 와 동일
.runOn(Schedulers.parallel())
.subscribe(data -> log.info("# onNext: {}", data));
Thread.sleep(100L);
}
}
챕터10의 Example10_3.java 의 코드가 책 내용과 다른 부분이 있는 것 같네요