* Updated a destructor of ThreadManger to stop the threads.