Detect failed tasks in concurrent.futures

前端 未结 2 2065
野趣味
野趣味 2021-01-17 17:43

I\'ve been using concurrent.futures as it has a simple interface and let user easily control the max number of threads/processes. However, it seems like concurrent.futures h

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-17 18:30

    There is another way to do the same with multiprocessing.Pool (for processes) or multiprocessing.pool.ThreadPool (for threads). As far as I know it rethrows any caught exceptions.

提交回复
热议问题