On Thu, 3 Dec 2026 10:48:25 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/lang/VirtualThread.java line 332:
> 
>> 330:         if (scheduler == DEFAULT_SCHEDULER) {
>> 331:             if (currentCarrierThread() instanceof CarrierThread
>> 332:                     && FJP_ACCESS.getSurplusQueuedTaskCount() > 3) {
> 
> @AlanBateman Was there any noticeable difference between using >= 3 and > 3? 
> (I'm curious)

I tested with thresholds of 2, 3 and 4. Using > 3 allows one more local push so 
more of the existing works see no change. That said, none of the benchmarks 
were conclusive and it might be that we re-visit the heuristic  again in the 
future.

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

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

Reply via email to