7778798081828384858687
} catch (LatchNotHeldException LNHE) { } } }; tester.doTest(); } /* Do a million acquire/release pairs. The junit output will tell us how long it took. */ public void testAcquireReleasePerformance()
110111112113114115116117118119120
assertTrue(stats.nAcquiresNoWaiters == N_PERF_TESTS); assertTrue(stats.nReleases == N_PERF_TESTS); } }; tester.doTest(); } /* Test latch waiting. */ public void testWait()