在python多处理中使用imap_unordered进行错误处理

时间:2015-08-13 23:16:59

标签: python python-multiprocessing

我正在尝试使用python多处理中的pool.imap_unordered来查询外部服务。我想做的是将输入分成较小的任务,如果一个失败。现在我有类似的东西:

results = []
for result in pool.imap_unordered(query_service, tasks):
    results.append(result)

imap_unordered是否会重新引用异常,如果子任务失败或者只是连续重试会导致异常吗?

0 个答案:

没有答案
相关问题