RFR: 8307483: New micros for j.u.c.LockSupport
Alan Bateman
alanb at openjdk.org
Fri May 5 14:43:23 UTC 2023
On Thu, 4 May 2023 20:17:11 GMT, Eric Caspole <ecaspole at openjdk.org> wrote:
> These micros were developed while investigating JDK-8305670 by myself and Sergey Kuksenko. The order of thread creation was important in that bug, so there are 2 JMH for creating sleepers before and after the worker threads.
test/micro/org/openjdk/bench/java/util/concurrent/UnparkBenchSleepersAfter.java line 131:
> 129: public void run() {
> 130: my_thread = Thread.currentThread();
> 131: while (!done) {
You might want to re-check IdleThread. From a quick look I would have expected "done" to be volatile. Also "my_thread" as it is set in the run with plain access.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13815#discussion_r1186169006
More information about the core-libs-dev
mailing list