Hi,

Please help to review the fix for bug https://bugs.openjdk.java.net/browse/JDK-8004807 as below:
http://cr.openjdk.java.net/~ewang/JDK-8004807/webrev.00/

The root cause of the failure is if Timer.cancel() is not called in time, the recurring timer task keeps running which cause the the assertion "check(latch.getCount() > 0)" failed.

The fix includes:
1. As the purpose of the assertion "check(latch.getCount() > 0)" in timer task is used to check if the unrepeatable task is executed repeatedly and this assertion is meaningless for a repeatable task. it can be replaced by other way, see the webrev. 2. The timer thread should be terminated ASAP once all tasks are finished to avoid time spent on thread switch. 3. The test should be executed in othervm mode to avoid time spent on thread switch.

Thanks,
Eric

Reply via email to