Add thread pool and tasks