On Wed, 2 Dec 2026 16:18:33 GMT, Viktor Klang <[email protected]> wrote:

>> Alan Bateman has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Drop observable change to direct calls to FJT.getSurplusQueuedTaskCount
>
> src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 2990:
> 
>> 2988:     static int getSurplusQueuedTaskCount() {
>> 2989:         ForkJoinPool pool; WorkQueue q;
>> 2990:         if (((JLA.currentCarrierThread()) instanceof 
>> ForkJoinWorkerThread wt) &&
> 
> The question is whether it is the right move to make this return something 
> other than 0 when being invoked inside of a VT. I guess one option would be 
> to refactor the implementation to be able to serve both the needs of 
> ForkJoinTask AND Virtual Threads? 🤔

A search of existing projects could only 3 usages, all in RecusiveTask::compute 
implementations. It would be easy to separate the two use-cases, maybe better 
to avoid any observable behavior change.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/34118#discussion_r4773359359

Reply via email to