On Apr 22, 6:33 pm, MRAB <goo...@mrabarnett.plus.com> wrote: > You could do this: > > from multiprocessing.queues import Empty > > queue = Queue() > Process(target=f, args=(queue,)).start() > while active_children(): > try: > print queue.get(timeout=1) > except Empty: > pass
This one isn't generic. When I have tasks that all finish within 0.1 seconds the above gives 10x overhead. On the other hand, if I know the results will be available after 10 hours there's no use in checking every second. Best regards, Michal Chruszcz -- http://mail.python.org/mailman/listinfo/python-list