(fut: Future)
| 522 | future_set_result_unless_cancelled(future, {} if keys is not None else []) |
| 523 | |
| 524 | def callback(fut: Future) -> None: |
| 525 | unfinished_children.remove(fut) |
| 526 | if not unfinished_children: |
| 527 | result_list = [] |
| 528 | for f in children_futs: |
| 529 | try: |
| 530 | result_list.append(f.result()) |
| 531 | except Exception as e: |
| 532 | if future.done(): |
| 533 | if not isinstance(e, quiet_exceptions): |
| 534 | app_log.error( |
| 535 | "Multiple exceptions in yield list", exc_info=True |
| 536 | ) |
| 537 | else: |
| 538 | future_set_exc_info(future, sys.exc_info()) |
| 539 | if not future.done(): |
| 540 | if keys is not None: |
| 541 | future_set_result_unless_cancelled( |
| 542 | future, dict(zip(keys, result_list)) |
| 543 | ) |
| 544 | else: |
| 545 | future_set_result_unless_cancelled(future, result_list) |
| 546 | |
| 547 | listening = set() # type: Set[Future] |
| 548 | for f in children_futs: |
no test coverage detected