Title: Document asyncio.futures.wrap_future()
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.5
Status: closed Resolution: duplicate
Dependencies: Superseder: asyncio.wrap_future undocumented
View: 24755
Assigned To: docs@python Nosy List: alex.gronholm, berker.peksag, docs@python, yselivanov
Priority: normal Keywords:

Created on 2015-08-03 11:44 by alex.gronholm, last changed 2015-08-03 12:31 by yselivanov. This issue is now closed.

Messages (2)
msg247924 - (view) Author: Alex Grönholm (alex.gronholm) * Date: 2015-08-03 11:44
Since Python 3.5 will not support awaiting for concurrent.futures.Futures natively, one has to use the asyncio.futures.wrap_future() function in coroutines like this:

async def foo():
    await wrap_future(executor.submit(...))

The wrap_future() function is, however, not mentioned in the asyncio documentation. It should be, in order for the standard library to provide the above crutch until proper support arrives in 3.6.
msg247926 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-08-03 12:04
This is a duplicate of issue 24755.
Date User Action Args
2015-08-03 12:31:27yselivanovsetnosy: + yselivanov
2015-08-03 12:04:02berker.peksagsetstatus: open -> closed

superseder: asyncio.wrap_future undocumented

nosy: + berker.peksag
messages: + msg247926
resolution: duplicate
stage: resolved
2015-08-03 11:44:43alex.gronholmcreate