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

Doug Lea dl at openjdk.org
Sat Jul 22 10:44:49 UTC 2023


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

> This update addresses performance issues across both LinkedTransferQueue and SynchronousQueue by creating a common basis for implementation across them (mainly in LinkedTransferQueue).  Pasting from internal doc summary of changes:
>      * * Class DualNode replaces Qnode, with fields and methods
>      *   that apply to any match-based dual data structure, and now
>      *   usable in other j.u.c classes. in particular, SynchronousQueue.
>      * * Blocking control (in class DualNode) accommodates
>      *   VirtualThreads and (perhaps virtualized) uniprocessors.
>      * * All fields of this class (LinkedTransferQueue) are
>      *   default-initializable (to null), allowing further extension
>      *   (in particular, SynchronousQueue.Transferer)
>      * * Head and tail fields are lazily initialized rather than set
>      *   to a dummy node, while also reducing retries under heavy
>      *   contention and misorderings, and relaxing some accesses,
>      *   requiring accommodation in many places (as well as
>      *   adjustments in WhiteBox tests).

This pull request has now been integrated.

Changeset: 8d1ab570
Author:    Doug Lea <dl at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/8d1ab57065c7ebcc650b5fb4ae098f8b0a35f112
Stats:     1714 lines in 3 files changed: 331 ins; 930 del; 453 mod

8301341: LinkedTransferQueue does not respect timeout for poll()
8300663: java/util/concurrent/SynchronousQueue/Fairness.java failed with "Error: fair=true i=0 j=1"
8267502: JDK-8246677 caused 16x performance regression in SynchronousQueue

Reviewed-by: alanb

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

PR: https://git.openjdk.org/jdk/pull/14317


More information about the core-libs-dev mailing list