On Fri, 18 Dec 2020 22:43:16 GMT, Mandy Chung <mch...@openjdk.org> wrote:

>> Brent Christian has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Add sleep to ForceGC.await()
>
> test/lib/jdk/test/lib/util/ForceGC.java line 49:
> 
>> 47:                 System.gc();
>> 48:                 System.out.format("doit %d: gc %d%n", iter, i);
>> 49:                 if (cleanerInvoked.await(1L, TimeUnit.SECONDS)) {
> 
> If the object that the test waits for garbage collected takes more GC cycles 
> than the object registered in ForceGC's cleaner, this will return 
> immediately.   If you are concerned, maybe if the count down latch already 
> becomes zero, it should call System.sleep before the next System.gc().

I am a little concerned.  But I think it makes more sense to sleep in await(), 
between calls of doit().  I'll push an update.

-------------

PR: https://git.openjdk.java.net/jdk16/pull/53

Reply via email to