hs-comp: VM is not exiting
Vitaly Davidovich
vitalyd at gmail.com
Thu Jun 11 17:11:15 UTC 2015
The OS is waiting.
This class is fairly bad, and should be avoided because the internal thread
is (a) non-daemon and (b) cannot be interrupted (it swallows IE and
continues). Javadoc calls this out:
After the last live reference to a Timer object goes away and all
outstanding tasks have completed execution, the timer's task execution
thread terminates gracefully (and becomes subject to garbage collection).
However, this can take arbitrarily long to occur. By default, the task
execution thread does not run as a daemon thread, so it is capable of
keeping an application from terminating. If a caller wants to terminate a
timer's task execution thread rapidly, the caller should invoke the timer's
cancel method.
On Thu, Jun 11, 2015 at 1:07 PM, Andrew Haley <aph at redhat.com> wrote:
> On 06/11/2015 05:49 PM, Vladimir Kozlov wrote:
> > Interesting. I tested jdk7,8,9 - all behave the same (ran with -Xint).
> > It hangs on some kind of synchronization:
>
> I think the VM is waiting for the number of non-daemon threads to drop to
> 1,
> but it never does.
>
> Andrew.
>
>
More information about the hotspot-dev
mailing list