``AsyncIOMainLoop`` creates an `.IOLoop` that corresponds to the current ``asyncio`` event loop (i.e. the one returned by ``asyncio.get_event_loop()``). .. deprecated:: 5.0 Now used automatically when appropriate; it is no longer necessary to refer to this class directly.
| 281 | |
| 282 | |
| 283 | class AsyncIOMainLoop(BaseAsyncIOLoop): |
| 284 | """``AsyncIOMainLoop`` creates an `.IOLoop` that corresponds to the |
| 285 | current ``asyncio`` event loop (i.e. the one returned by |
| 286 | ``asyncio.get_event_loop()``). |
| 287 | |
| 288 | .. deprecated:: 5.0 |
| 289 | |
| 290 | Now used automatically when appropriate; it is no longer necessary |
| 291 | to refer to this class directly. |
| 292 | |
| 293 | .. versionchanged:: 5.0 |
| 294 | |
| 295 | Closing an `AsyncIOMainLoop` now closes the underlying asyncio loop. |
| 296 | """ |
| 297 | |
| 298 | def initialize(self, **kwargs: Any) -> None: # type: ignore |
| 299 | super().initialize(asyncio.get_event_loop(), **kwargs) |
| 300 | |
| 301 | def make_current(self) -> None: |
| 302 | # AsyncIOMainLoop already refers to the current asyncio loop so |
| 303 | # nothing to do here. |
| 304 | pass |
| 305 | |
| 306 | |
| 307 | class AsyncIOLoop(BaseAsyncIOLoop): |