| 535 | self.add_reader(self._waker_r, self._consume_waker) |
| 536 | |
| 537 | def __del__(self) -> None: |
| 538 | # If the top-level application code uses asyncio interfaces to |
| 539 | # start and stop the event loop, no objects created in Tornado |
| 540 | # can get a clean shutdown notification. If we're just left to |
| 541 | # be GC'd, we must explicitly close our sockets to avoid |
| 542 | # logging warnings. |
| 543 | _selector_loops.discard(self) |
| 544 | self._waker_r.close() |
| 545 | self._waker_w.close() |
| 546 | |
| 547 | def close(self) -> None: |
| 548 | with self._select_cond: |