Convert a Tornado yieldable object to an `asyncio.Future`. .. versionadded:: 4.1 .. versionchanged:: 4.3 Now accepts any yieldable object, not just `tornado.concurrent.Future`. .. deprecated:: 5.0 Tornado ``Futures`` have been merged with `asyncio.Future`,
(tornado_future: asyncio.Future)
| 382 | |
| 383 | |
| 384 | def to_asyncio_future(tornado_future: asyncio.Future) -> asyncio.Future: |
| 385 | """Convert a Tornado yieldable object to an `asyncio.Future`. |
| 386 | |
| 387 | .. versionadded:: 4.1 |
| 388 | |
| 389 | .. versionchanged:: 4.3 |
| 390 | Now accepts any yieldable object, not just |
| 391 | `tornado.concurrent.Future`. |
| 392 | |
| 393 | .. deprecated:: 5.0 |
| 394 | Tornado ``Futures`` have been merged with `asyncio.Future`, |
| 395 | so this method is now equivalent to `tornado.gen.convert_yielded`. |
| 396 | """ |
| 397 | return convert_yielded(tornado_future) |
| 398 | |
| 399 | |
| 400 | if sys.platform == "win32" and hasattr(asyncio, "WindowsSelectorEventLoopPolicy"): |