A functional thread pool