- added an overloaded method for terminating the thread pool