RFR: 8319447: Improve performance of delayed task handling [v4]
Doug Lea
dl at openjdk.org
Tue Feb 25 21:02:57 UTC 2025
On Tue, 25 Feb 2025 14:46:07 GMT, Viktor Klang <vklang at openjdk.org> wrote:
>> Doug Lea has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Standardize parameter checking
>
> src/java.base/share/classes/java/util/concurrent/DelayScheduler.java line 356:
>
>> 354: for (int ck = cs, j = 4;;) { // at most 4 children
>> 355: if ((c = h[ck]) == null)
>> 356: break;
>
> Is it "cheaper" to place this here instead of in the loop-conditional?
It's there in that way to make it easier to revisit decision about whether to null out slot immediately on seeing cancellation. I don't think it impacts anything else.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23702#discussion_r1970535302
More information about the core-libs-dev
mailing list