Когда Gather2 возвращает false . downstream.push в сборе1 - Финишер IS false . Это верно.
Но почему Downstream.Isrejecting всегда всегда? Это должно быть истинно , поскольку вниз по течению отклоняется. Проблема возникает только тогда, когда мы цепляем 2 собрания. < /P>
Stream.of(0)
.gather(gather1())
.gather(gather2())
.forEach(System.out::println);
static Gatherer gather1() {
return Gatherer.ofSequential(
Gatherer.Integrator.ofGreedy((state, element, downstream) -> downstream.push(element)),
(unused, downstream) -> {
for (int i = 1; i false
)
);
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... consistent