Expected behavior of a Streams.cycled() instance - found issues and questions
Olexandr Demura
oleksander.demura at gmail.com
Tue Oct 23 11:02:40 PDT 2012
flatMap(Block<R> sink, T element).iterator() supposed to return Iterator<R>
of outputs you produce from elements and put into sink.
You put none, so next() hangs till there is something in the sink
because original stream never ends.
2012/10/23 Dmitry Bessonov <dmitry.bessonov at oracle.com>:
> 2) Getting next element of a flatMap of a cycled stream leads to hanging:
> Streams.cycle(Arrays.asList(1, 2, 3)).flatMap((Block<Object> sink,
> Integer element) -> {}).iterator().next();
More information about the lambda-dev
mailing list