Enforce the management of the threads to avoid killing of them before they have done their job.
The thread that is calling the killMe must not be cancelled, otherwise a part of the shutdown process is skipped.