RFR: 8347274: Gatherers.mapConcurrent exhibits undesired behavior under variable delays, interruption, and finishing [v2]

Alan Bateman alanb at openjdk.org
Fri Jan 10 10:39:39 UTC 2025


On Thu, 9 Jan 2025 15:43:59 GMT, Viktor Klang <vklang at openjdk.org> wrote:

>> src/java.base/share/classes/java/util/stream/Gatherers.java line 392:
>> 
>>> 390:                     while (proceed
>>> 391:                         && (current = wip.peekFirst()) != null
>>> 392:                         && (current.isDone() || atLeastN > 0)) {
>> 
>> It might be better to indent these two lines so that it's clearer what the while expression is vs. the code in the block.
>
> Fair point—I reformatted that while clause to something which is hopefully easier to read.

I'd probably formatting it differently but what you have it readable so okay.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22999#discussion_r1910176615


More information about the core-libs-dev mailing list