(self)
| 102 | self.loop = asyncio.new_event_loop() |
| 103 | |
| 104 | def run(self): |
| 105 | asyncio.set_event_loop(self.loop) |
| 106 | with open(self.output_path, "wb") as self.output: |
| 107 | self.loop.run_forever() |
| 108 | |
| 109 | # Run one final round of callbacks so the await on |
| 110 | # stop() in another event loop will be resolved. |
| 111 | self.loop.run_until_complete(asyncio.sleep(0)) |
| 112 | |
| 113 | |
| 114 | print("Example 5") |