tmf: Make sure the request scheduler threads end gracefully
Upon disposing a trace, the timer thread for the request executor
was not being stopped. While this was not a problem for normal Eclipse
usage, it becomes a problem when trying to run headless methods in the
tree that use the request scheduler: since some user threads were still
running, the JVM would not close and stay there waiting forever.
Additionally, mark the timer thread as a daemon thread. This is a safeguard
in case a trace is never disposed. This will let the JVM shutdown correctly
even if there are any of those threads still running.
As per the Thread.setDaemon() Javadoc:
Marks this thread as either a daemon thread or a user thread. The Java
Virtual Machine exits when the only threads running are all daemon threads.
Change-Id: I04e628cfd444ee86293f262017c948642619f661
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/15387
Tested-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
IP-Clean: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
This page took 0.029201 seconds and 5 git commands to generate.