Re: RFR 8027316 Distinct operation on an unordered stream should not be a barrier

2013-11-01 Thread Paul Sandoz
On Oct 30, 2013, at 5:54 PM, Henry Jen wrote: > Looks good to me. > > In the test, > >> Integer one = Stream.iterate(1, i -> i + >> 1).unordered().parallel().distinct().findAny().get(); >> assertEquals(one.intValue(), 1); > > The implementation is probably make sure this will return 1, but

Re: RFR 8027316 Distinct operation on an unordered stream should not be a barrier

2013-10-30 Thread Paul Sandoz
On Oct 30, 2013, at 5:54 PM, Henry Jen wrote: > Looks good to me. > Thanks. > In the test, > >> Integer one = Stream.iterate(1, i -> i + >> 1).unordered().parallel().distinct().findAny().get(); >> assertEquals(one.intValue(), 1); > > The implementation is probably make sure this will ret

Re: RFR 8027316 Distinct operation on an unordered stream should not be a barrier

2013-10-30 Thread Mike Duigou
Looks OK to me. Thanks for including a comment in the tests. :-) Mike On Oct 30 2013, at 02:30 , Paul Sandoz wrote: > Hi > > Please review: > > http://cr.openjdk.java.net/~psandoz/tl/JDK-8027316-distinct-unordered/webrev/ > > The fix ensures that the distinct operation, for a parallel st

Re: RFR 8027316 Distinct operation on an unordered stream should not be a barrier

2013-10-30 Thread Henry Jen
Looks good to me. In the test, > Integer one = Stream.iterate(1, i -> i + > 1).unordered().parallel().distinct().findAny().get(); > assertEquals(one.intValue(), 1); The implementation is probably make sure this will return 1, but is that what we spec to do? I sort of think it can have various

RFR 8027316 Distinct operation on an unordered stream should not be a barrier

2013-10-30 Thread Paul Sandoz
Hi Please review: http://cr.openjdk.java.net/~psandoz/tl/JDK-8027316-distinct-unordered/webrev/ The fix ensures that the distinct operation, for a parallel stream, is not a full barrier if the upstream is unordered (and not already distinct, otherwise it is a no-op). Thanks, Paul.