conveniently, there's a ThreadPool that acts just like a multiprocessing Pool