On Fri, 10 May 2024 11:44:14 GMT, Doug Lea <d...@openjdk.org> wrote:

>> src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1412:
>> 
>>> 1410:                         if (stalled)
>>> 1411:                             Thread.onSpinWait();
>>> 1412:                         stalled = true;
>> 
>> @DougLea Performance-wise, does it make any difference to make the write to 
>> `stalled` in an `else-branch` to avoid writing it every time beyond the 
>> initial?
>
> This doesn't matter performance-wise but I agree that it looks unnecessarily 
> odd so will change.

Or better (wrt this and previous comment): make the code-shape of poll() the 
same as inner loop of scan(). Done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19131#discussion_r1596772902

Reply via email to