RFR (XXS): 8066896: Update c.o.j.t.InfiniteLoop to skip zero timeout
Vladimir Kozlov
vladimir.kozlov at oracle.com
Thu Dec 11 21:57:11 UTC 2014
Why it is a problem?
/**
* Class which runs another Runnable in infinite loop with certain pauses
* between cycles.
*/
It does not say that it will not pause for few instructions to execute Thread.sleep(0).
Thanks,
Vladimir
On 12/9/14 8:50 AM, Pavel Chistyakov wrote:
> Hi all,
>
> please review changes for: https://bugs.openjdk.java.net/browse/JDK-8066896
> webrev: http://cr.openjdk.java.net/~iignatyev/pchistyakov/8066896/webrev.00/
> <http://cr.openjdk.java.net/%7Eiignatyev/pchistyakov/8066896/webrev.00/>
>
> Problem:
> InfiniteLoop allows zero value as timeout and waste time for Thread.sleep(0) call that is not needed in this case.
>
> Solution:
> Add a condition for skipping 0 (zero) timeout when calling Thread.sleep
>
> Testing: manual
>
> -------------------
> Thanks,
> Pavel
More information about the hotspot-compiler-dev
mailing list