Defintion of the thread pool service.