Bogdanp/dramatiq

Feature Request: iterate over a group as actors complete

开放

#278 创建于 2020年2月27日

 (3 条评论) (0 个反应) (0 位负责人)Python (277 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (3,884 个星标)
PR 合并指标
 (平均合并 20天 20小时) (30 天内合并 10 个 PR)

描述

concurrent.futures (and probably other Python stdlib stuff) has the idea of iterating over results from concurrent processing as they are completed:

https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.as_completed

I'm currently using the Group.get_results() method to iterate over a group of results, but it would be nice to be able to do that as the results come back instead of in the order they were queued. That way, if I have a network request hang at the very beginning, I can get other work done while that action times out and is retried.

贡献者指南