Return {parent_task_id: {child_task_id, …}, …}.
(awaits)
| 103 | |
| 104 | # ─── detect cycles in the task-to-task graph ─────────────────────── |
| 105 | def _task_graph(awaits): |
| 106 | """Return {parent_task_id: {child_task_id, …}, …}.""" |
| 107 | g = defaultdict(set) |
| 108 | for parent_id, _stack, child_id in awaits: |
| 109 | g[parent_id].add(child_id) |
| 110 | return g |
| 111 | |
| 112 | |
| 113 | def _find_cycles(graph): |
no test coverage detected
searching dependent graphs…