RFR: 8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted" [v49]
Doug Lea
dl at openjdk.org
Thu Oct 12 17:09:54 UTC 2023
On Thu, 12 Oct 2023 13:48:23 GMT, Viktor Klang <vklang at openjdk.org> wrote:
>> Doug Lea has updated the pull request incrementally with one additional commit since the last revision:
>>
>> More cleanup
>
> src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 3324:
>
>> 3322: poolSubmit(true, f);
>> 3323: }
>> 3324: for (int i = futures.size() - 1; i >= 0; --i)
>
> @DougLea Might not be necessary for performance, but using an ArrayDeque and using `pollLast()` might be cleaner?
This was a good enough idea that I started doing it until realizing/remembering that ArrayDeque doesn't implement List so can't be used here (without making a copy). Oh well.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14301#discussion_r1357139728
More information about the core-libs-dev
mailing list