Message326812
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? |
|
Date |
User |
Action |
Args |
2018-10-01 16:14:38 | yselivanov | set | recipients:
+ yselivanov, asvetlov, hellysmile |
2018-10-01 16:14:38 | yselivanov | set | messageid: <1538410478.8.0.545547206417.issue34014@psf.upfronthosting.co.za> |
2018-10-01 16:14:38 | yselivanov | link | issue34014 messages |
2018-10-01 16:14:38 | yselivanov | create | |
|