(self, all_fds: bool = False)
| 140 | super().initialize(**kwargs) |
| 141 | |
| 142 | def close(self, all_fds: bool = False) -> None: |
| 143 | self.closing = True |
| 144 | for fd in list(self.handlers): |
| 145 | fileobj, handler_func = self.handlers[fd] |
| 146 | self.remove_handler(fd) |
| 147 | if all_fds: |
| 148 | self.close_fd(fileobj) |
| 149 | # Remove the mapping before closing the asyncio loop. If this |
| 150 | # happened in the other order, we could race against another |
| 151 | # initialize() call which would see the closed asyncio loop, |
| 152 | # assume it was closed from the asyncio side, and do this |
| 153 | # cleanup for us, leading to a KeyError. |
| 154 | del IOLoop._ioloop_for_asyncio[self.asyncio_loop] |
| 155 | if self.selector_loop is not self.asyncio_loop: |
| 156 | self.selector_loop.close() |
| 157 | self.asyncio_loop.close() |
| 158 | |
| 159 | def add_handler( |
| 160 | self, fd: Union[int, _Selectable], handler: Callable[..., None], events: int |
nothing calls this directly
no test coverage detected