MCPcopy Create free account
hub / github.com/EasyIME/PIME / to_asyncio_future

Function to_asyncio_future

python/python3/tornado/platform/asyncio.py:384–397  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

382
383
384def 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
400if sys.platform == "win32" and hasattr(asyncio, "WindowsSelectorEventLoopPolicy"):

Calls 1

convert_yieldedFunction · 0.90