RFR: 8301341: LinkedTransferQueue does not respect timeout for poll()

Andrey Turbanov aturbanov at openjdk.org
Tue Jun 13 16:18:52 UTC 2023


On Mon, 5 Jun 2023 18:52:00 GMT, Doug Lea <dl at openjdk.org> wrote:

> This now uses Thread.isVirtual to distinguish spin vs immediate block cases, enabling re-introduction of spin control from the previous version, removing anomalies like this one.

src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java line 701:

> 699:                     spins = 0;                  // don't spin
> 700:                 else if (pred.isData != isData || pred.isMatched())
> 701:                     spins =  FRONT_SPINS;

nit
Suggestion:

                    spins = FRONT_SPINS;

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14317#discussion_r1228392118


More information about the core-libs-dev mailing list