polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kent Sølvsten <kent.soelvs...@gmail.com>
Subject Re: Stream creation...
Date Fri, 04 Sep 2015 13:02:05 GMT
It fixed a problem  in an Aggregate test (don't recall the exact name of
the test).

My guess is that the previous version was streaming and removing
concurrently
 - the new implementation finds all items that should be removed before
starting the actual removal.

/Kent


Den 04-09-2015 kl. 14:01 skrev Niclas Hedhman:
> I am also curious about this change;
>
> -        ).distinct().forEach( unitOfWork::remove );
> +        ).distinct().collect( Collectors.toList() ).stream().forEach(
> unitOfWork::remove );
>
> From my understanding it is the same thing (except slower). Do you recall
> what this is about?
>
>
> On Fri, Sep 4, 2015 at 7:56 PM, Niclas Hedhman <niclas@hedhman.org> wrote:
>
>> Kent,
>> while reviewing, I saw
>>
>>     Arrays.asList( type ).stream()
>>
>> This can more efficiently be written as
>>
>>     Stream.of( type )
>>
>> Cheers
>> --
>> Niclas Hedhman, Software Developer
>> http://zest.apache.org - New Energy for Java
>>
>
>


Mime
View raw message