(self, daemon=False)
| 538 | class _EventLoopThread: |
| 539 | |
| 540 | def __init__(self, daemon=False): |
| 541 | fut = concurrent.futures.Future() |
| 542 | self.thread = Thread(target=partial(self._thread_entry, fut), daemon=daemon) |
| 543 | self.thread.start() |
| 544 | self.loop: asyncio.AbstractEventLoop = fut.result() |
| 545 | self.closed = False |
| 546 | if daemon: |
| 547 | atexit.register(self.close) |
| 548 | |
| 549 | def _thread_entry(self, fut): |
| 550 | loop = asyncio.new_event_loop() |