This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients asvetlov, hellysmile, yselivanov
Date 2018-10-01.16:14:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538410478.8.0.545547206417.issue34014@psf.upfronthosting.co.za>
In-reply-to
Content
So we're deprecating passing non-ThreadPoolExecutor instances to loop.set_default_executor.  In 3.9 that will trigger an error.

For this issue we have basically the next few options:

(1) Do nothing;

(2) Fix "run_in_executor" to start copying and running in correct context automatically

(3) Add a new keyword-only parameter to "run_in_executor": "retain_context=False"

(4) Design a new async/await friendly API for using thread- and process-pools.

Now, (4) will happen.  The "run_in_executor" method is low-level and requires accessing the event loop to use it.  We probably have enough time to design this new API before 3.8.

As for implementing (3) in 3.8 -- I'd be OK with that too.  Andrew, your thoughts?
History
Date User Action Args
2018-10-01 16:14:38yselivanovsetrecipients: + yselivanov, asvetlov, hellysmile
2018-10-01 16:14:38yselivanovsetmessageid: <1538410478.8.0.545547206417.issue34014@psf.upfronthosting.co.za>
2018-10-01 16:14:38yselivanovlinkissue34014 messages
2018-10-01 16:14:38yselivanovcreate