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

Alan Bateman alanb at openjdk.org
Tue Jun 6 11:44:53 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.

This looks okay to me, it was a bit easier than I expected.

The only comment I have is an interrupt while spinning won't be noticed until count goes to 0, that should be rare enough that it doesn't matter. We might have to tune SPIN_FOR_TIMEOUT_THRESHOLD at some point for virtual threads.

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

Marked as reviewed by alanb (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14317#pullrequestreview-1464982532


More information about the core-libs-dev mailing list