RFR: 8314515: java/util/concurrent/SynchronousQueue/Fairness.java failed with "Error: fair=false i=8 j=0"
Alan Bateman
alanb at openjdk.org
Wed Jan 10 17:21:24 UTC 2024
On Tue, 12 Dec 2023 15:13:01 GMT, Viktor Klang <vklang at openjdk.org> wrote:
> While this might not fix 8314515, it should at least make it more exact.
test/jdk/java/util/concurrent/SynchronousQueue/Fairness.java line 42:
> 40: private static void testFairness(boolean fair,
> 41: final SynchronousQueue<Integer> q,
> 42: final VarHandle underlyingHandle)
The updated approach to wait until the thread is finished putting seems okay. It might be a bit cleaner for the param to testFariness be the underlying LTQ rather than calling it with a VarHandle, meaning do this in the caller.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17082#discussion_r1447689444
More information about the core-libs-dev
mailing list