Author yselivanov
Recipients asvetlov, docs@python, yselivanov
Date 2017-12-13.20:03:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I don't like the low-level API of run_in_executor.  "executor" being the first argument, the inability to pass **kwargs, etc.

I'd expect to see a more high-level API, perhaps the one that supports 'async with':

    async with asyncio.ThreadPool() as pool:
        f1 =
        f2 =
        r3 = await

    r1 = f1.result()
    r2 = f2.result()
    print(r1, r2, r3)

I mean it's great that we can use 'concurrent.futures' in asyncio, but having native asyncio pools implementation would be way more convenient to the users.

In any case, can we focus this issue on the "run_in_executor" API, and open a new one for "create_task"?
Date User Action Args
2017-12-13 20:03:46yselivanovsetrecipients: + yselivanov, asvetlov, docs@python
2017-12-13 20:03:46yselivanovsetmessageid: <>
2017-12-13 20:03:46yselivanovlinkissue32309 messages
2017-12-13 20:03:46yselivanovcreate