ThreadPool constractor