()
| 54 | |
| 55 | |
| 56 | def get_event_loop() -> asyncio.AbstractEventLoop: |
| 57 | try: |
| 58 | # If there is already an event loop, use it. |
| 59 | loop = asyncio.get_event_loop() |
| 60 | except RuntimeError: |
| 61 | # If in a sub-thread, create a new event loop. |
| 62 | loop = asyncio.new_event_loop() |
| 63 | asyncio.set_event_loop(loop) |
| 64 | return loop |
| 65 | |
| 66 | |
| 67 | def extract_sorted_scores( |
no outgoing calls