{"body":"def wait_done_or_dead(futs, dead, check_timeout=1):\n    while True:\n        _done, not_done = futures.wait(futs, timeout=check_timeout)\n        if len(not_done) == 0:\n            break\n        if dead.is_set():\n            for fut in not_done:\n                # This may not actually be able to cancel, but try to\n                # if we can.\n                fut.cancel()","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/i0ZtAz8y","modified":1505495813,"id":"i0ZtAz8y","size":371,"lines":10,"own_paste":false,"theme":"","date":1505495813}