Closes the `IOLoop`, freeing any resources used. If ``all_fds`` is true, all file descriptors registered on the IOLoop will be closed (not just the ones created by the `IOLoop` itself). Many applications will only use a single `IOLoop` that runs for the enti
(self, all_fds: bool = False)
| 363 | self._make_current() |
| 364 | |
| 365 | def close(self, all_fds: bool = False) -> None: |
| 366 | """Closes the `IOLoop`, freeing any resources used. |
| 367 | |
| 368 | If ``all_fds`` is true, all file descriptors registered on the |
| 369 | IOLoop will be closed (not just the ones created by the |
| 370 | `IOLoop` itself). |
| 371 | |
| 372 | Many applications will only use a single `IOLoop` that runs for the |
| 373 | entire lifetime of the process. In that case closing the `IOLoop` |
| 374 | is not necessary since everything will be cleaned up when the |
| 375 | process exits. `IOLoop.close` is provided mainly for scenarios |
| 376 | such as unit tests, which create and destroy a large number of |
| 377 | ``IOLoops``. |
| 378 | |
| 379 | An `IOLoop` must be completely stopped before it can be closed. This |
| 380 | means that `IOLoop.stop()` must be called *and* `IOLoop.start()` must |
| 381 | be allowed to return before attempting to call `IOLoop.close()`. |
| 382 | Therefore the call to `close` will usually appear just after |
| 383 | the call to `start` rather than near the call to `stop`. |
| 384 | |
| 385 | .. versionchanged:: 3.1 |
| 386 | If the `IOLoop` implementation supports non-integer objects |
| 387 | for "file descriptors", those objects will have their |
| 388 | ``close`` method when ``all_fds`` is true. |
| 389 | """ |
| 390 | raise NotImplementedError() |
| 391 | |
| 392 | @typing.overload |
| 393 | def add_handler( |
no outgoing calls