(f)
| 501 | cur_task = current_task() |
| 502 | |
| 503 | def _on_completion(f): |
| 504 | nonlocal counter |
| 505 | counter -= 1 |
| 506 | if (counter <= 0 or |
| 507 | return_when == FIRST_COMPLETED or |
| 508 | return_when == FIRST_EXCEPTION and (not f.cancelled() and |
| 509 | f.exception() is not None)): |
| 510 | if timeout_handle is not None: |
| 511 | timeout_handle.cancel() |
| 512 | if not waiter.done(): |
| 513 | waiter.set_result(None) |
| 514 | futures.future_discard_from_awaited_by(f, cur_task) |
| 515 | |
| 516 | for f in fs: |
| 517 | f.add_done_callback(_on_completion) |
nothing calls this directly
no test coverage detected
searching dependent graphs…