On Mon, 14 Jun 2021 15:42:03 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> wrote:
> This patch contains another minor tweak to TestResourceScope as we have seen > this test timing out at least once (on arm64). > > I realized that some of the logic recently introduced in the test could lead > to the test waiting forever: for instance, if all threads are executed right > away before the main thread gets a chance to do anything, we'd be in a state > where the lock count is zero, and no other thread will update it. I've > removed the while loop - as that's not essential to make sure that the test > works (what we want is to trigger a close operation that is concurrent with > respect some acquire/release). > > I've also lowered the number of threads - which was using 10K - that was good > for stress testing, but it's not a good number in more realistic conditions. LGTM ------------- Marked as reviewed by jvernee (Reviewer). PR: https://git.openjdk.java.net/jdk17/pull/45