MCPcopy
hub / github.com/tornadoweb/tornado / to_asyncio_future

Function to_asyncio_future

tornado/platform/asyncio.py:374–387  ·  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

372
373
374def to_asyncio_future(tornado_future: asyncio.Future) -> asyncio.Future:
375 """Convert a Tornado yieldable object to an `asyncio.Future`.
376
377 .. versionadded:: 4.1
378
379 .. versionchanged:: 4.3
380 Now accepts any yieldable object, not just
381 `tornado.concurrent.Future`.
382
383 .. deprecated:: 5.0
384 Tornado ``Futures`` have been merged with `asyncio.Future`,
385 so this method is now equivalent to `tornado.gen.convert_yielded`.
386 """
387 return convert_yielded(tornado_future)
388
389
390_AnyThreadEventLoopPolicy = None

Calls 1

convert_yieldedFunction · 0.90