Author antoine.pietri
Recipients antoine.pietri, asvetlov, cjrh, primal, yselivanov
Date 2019-10-12.11:39:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On Sat, Oct 12, 2019 at 1:24 PM Caleb Hattingh <> wrote:
> Even before task groups land, this API can be easily improved by adding
> asyncio.run_in_executor(func, *args, **kwargs)
> - Only valid inside a coro or async context (uses get_running_loop internally)
> - Analogous to how `loop.create_task` became `asyncio.create_task`
> - Drop having to specify `None` for the default executor
> - Users already know the `run_in_executor` name
> - Allow both positional and kwargs (we can partial internally before calling loop.run_in_executor)

I think it should be run_thread() if it only works for thread.
run_in_executor() should take an executor= parameter, but it wouldn't
be as clear for beginners. I think there's value in having a simple,
explicit way of saying "I want to run this function in a thread"
without having to know what executors are.
Date User Action Args
2019-10-12 11:39:45antoine.pietrisetrecipients: + antoine.pietri, asvetlov, cjrh, yselivanov, primal
2019-10-12 11:39:44antoine.pietrilinkissue38306 messages
2019-10-12 11:39:44antoine.pietricreate