Add thread pool implementation