Closed GoogleCodeExporter closed 9 years ago
better implementation which is scalable but still quite messy:
def run_to_results_any(self, calls):
res_queue = Queue()
def run(call):
res = call()
res_queue.put(res)
return res
fs = self.run_to_futures((partial(run, call) for call in calls),
return_when=RETURN_IMMEDIATELY)
yielded = 0
while yielded < len(fs):
yield res_queue.get()
yielded += 1
Original comment by infinity0x@gmail.com
on 4 Apr 2010 at 2:36
This code has been completely rewritten.
Original comment by Dublin...@gmail.com
on 21 May 2010 at 1:19
Original comment by brian.qu...@gmail.com
on 14 Nov 2010 at 3:49
Original issue reported on code.google.com by
infinity0x@gmail.com
on 3 Apr 2010 at 8:04