hs-comp: VM is not exiting
vitalyd at gmail.com
Thu Jun 11 17:22:23 UTC 2015
Yes, that's true. There's an object with a finalizer that sets a flag
indicating no more submissions are allowed, and wakes up the timer thread.
This Timer is static, so what's the implication of GC+finalization here?
On Thu, Jun 11, 2015 at 1:12 PM, Andrew Haley <aph at redhat.com> wrote:
> On 06/11/2015 06:11 PM, Vitaly Davidovich wrote:
> > The OS is waiting.
> > This class is fairly bad, and should be avoided because the internal
> > 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
> > cancel method.
> But the Timer should time out after 1 second...
More information about the hotspot-dev