Just to stop the thread when the JVM is stopped.