Re: RFR: 8301341: LinkedTransferQueue does not respect timeout for poll() [v6]
On Mon, 17 Jul 2023 14:45:57 GMT, Andrey Turbanov wrote: >> Doug Lea has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains seven additional commits >> since the last revision: >> >> - Merge branch 'openjdk:master' into JDK-8301341 >> - Simplify contention handling; fix test >> - Fix inverted test assert; improve internal documentation; simplify code >> - Merge branch 'openjdk:master' into JDK-8301341 >> - Overhaul LTQ and SQ to use common blocking and matching mechanics >> - Merge branch 'openjdk:master' into JDK-8301341 >> - Use Thread.isVirtual to distinguish spin vs immediate block cases > > src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java line > 232: > >> 230: * The transferer. (See below about serialization.) >> 231: */ >> 232: private transient final Transferer transferer; > > let's use blessed modifiers order > Suggestion: > > private final transient Transferer transferer; Thanks. Done > src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java line > 234: > >> 232: private transient final Transferer transferer; >> 233: >> 234: private transient final boolean fair; > > nit > Suggestion: > > private final transient boolean fair; Thanks. Done. - PR Review Comment: https://git.openjdk.org/jdk/pull/14317#discussion_r1269256519 PR Review Comment: https://git.openjdk.org/jdk/pull/14317#discussion_r1269257030
Re: RFR: 8301341: LinkedTransferQueue does not respect timeout for poll() [v6]
On Thu, 13 Jul 2023 19:21:01 GMT, Doug Lea 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. > > Doug Lea has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the merge/rebase. The pull request contains seven additional commits since > the last revision: > > - Merge branch 'openjdk:master' into JDK-8301341 > - Simplify contention handling; fix test > - Fix inverted test assert; improve internal documentation; simplify code > - Merge branch 'openjdk:master' into JDK-8301341 > - Overhaul LTQ and SQ to use common blocking and matching mechanics > - Merge branch 'openjdk:master' into JDK-8301341 > - Use Thread.isVirtual to distinguish spin vs immediate block cases src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java line 232: > 230: * The transferer. (See below about serialization.) > 231: */ > 232: private transient final Transferer transferer; let's use blessed modifiers order Suggestion: private final transient Transferer transferer; src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java line 234: > 232: private transient final Transferer transferer; > 233: > 234: private transient final boolean fair; nit Suggestion: private final transient boolean fair; - PR Review Comment: https://git.openjdk.org/jdk/pull/14317#discussion_r1265479543 PR Review Comment: https://git.openjdk.org/jdk/pull/14317#discussion_r1265480051
Re: RFR: 8301341: LinkedTransferQueue does not respect timeout for poll() [v6]
On Thu, 13 Jul 2023 19:21:01 GMT, Doug Lea 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. > > Doug Lea has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the merge/rebase. The pull request contains seven additional commits since > the last revision: > > - Merge branch 'openjdk:master' into JDK-8301341 > - Simplify contention handling; fix test > - Fix inverted test assert; improve internal documentation; simplify code > - Merge branch 'openjdk:master' into JDK-8301341 > - Overhaul LTQ and SQ to use common blocking and matching mechanics > - Merge branch 'openjdk:master' into JDK-8301341 > - Use Thread.isVirtual to distinguish spin vs immediate block cases Need to digest this a bit. Will give more concrete feedback ASAP :) src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java line 180: > 178: * increase CAS contention and overhead. Using the smallest > 179: * non-zero value of one is both simple and empirically a good > 180: * choice in most applicatkions. The slack value is hard-wired: a s/applicatkions/applications - PR Review: https://git.openjdk.org/jdk/pull/14317#pullrequestreview-1510867492 PR Review Comment: https://git.openjdk.org/jdk/pull/14317#discussion_r1263111307
Re: RFR: 8301341: LinkedTransferQueue does not respect timeout for poll() [v6]
> 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. Doug Lea has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision: - Merge branch 'openjdk:master' into JDK-8301341 - Simplify contention handling; fix test - Fix inverted test assert; improve internal documentation; simplify code - Merge branch 'openjdk:master' into JDK-8301341 - Overhaul LTQ and SQ to use common blocking and matching mechanics - Merge branch 'openjdk:master' into JDK-8301341 - Use Thread.isVirtual to distinguish spin vs immediate block cases - Changes: - all: https://git.openjdk.org/jdk/pull/14317/files - new: https://git.openjdk.org/jdk/pull/14317/files/2f591a0b..060e6774 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14317&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14317&range=04-05 Stats: 61202 lines in 786 files changed: 10819 ins; 48250 del; 2133 mod Patch: https://git.openjdk.org/jdk/pull/14317.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14317/head:pull/14317 PR: https://git.openjdk.org/jdk/pull/14317