Streams returned by flat-mappers (parallel, unordered)
Georgiy Rakov
georgiy.rakov at oracle.com
Fri Apr 12 10:08:42 PDT 2013
Hello,
according to b85 all the flatMap-methods accept mappers returning stream
instances (Function<T, Stream <R>>, IntFunction<IntStream>, etc.).
I wonder if spec will specify any recommendations regarding what kinds
of streams user should or should not return from flat-mappers.
For instance:
"If called stream is supposed to be executed in parallel then
flat-mapper should return parallel streams or streams which could be
converted to those by calling its parallel() method; otherwise the
streams returned by flat-mapper will be executed sequentially."
Recommendations regarding unordered streams also seem to be interesting.
Thanks,
Georgiy.
More information about the lambda-dev
mailing list