RFR: 8319447: Improve performance of delayed task handling [v13]

Viktor Klang vklang at openjdk.org
Thu Mar 27 09:09:29 UTC 2025


On Wed, 26 Mar 2025 19:52:16 GMT, Doug Lea <dl at openjdk.org> wrote:

>> src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 3932:
>> 
>>> 3930:      * @since 25
>>> 3931:      */
>>> 3932:     public int getDelayedTaskCount() {
>> 
>> @DougLea It would seem more consistent to have this return a `long` like `getQueuedTaskCount` (even if that amount isn't currently possible to represent in the heap. Thoughts, @AlanBateman?
>
> Arguably better, but not sure it is worth regenerating diffs for? (An int was used for the same reason as in FJT.getQueueSize  -- they need to be valid array bounds. Which might someday allow long, but if so many things would change.)

Personally I think it's worth it. @AlanBateman, what do you think?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23702#discussion_r2016011679


More information about the core-libs-dev mailing list