Thank you so much for all your efforts on this change, Kyle! And thanks to Brian Q and Antoine P for reviewing.
On Sun, Feb 2, 2020 at 15:40 Kyle Stanley <aeros...@gmail.com> wrote: > > I would certainly be willing to look into it. > > As an update to this thread for anyone interested in this feature, it's > been implemented in Python 3.9 for both ProcessPoolExecutor and > ThreadPoolExecutor as a new parameter to Executor.shutdown(), > *cancel_futures*. > > For a description of the feature, see the updated documentation: > https://docs.python.org/3.9/library/concurrent.futures.html#concurrent.futures.Executor.shutdown > > For implementation details, see the PR: > https://github.com/python/cpython/pull/18057 > > Also, thank you Guido for bringing attention to the issue. The > implementation was a bit more involved than I initially anticipated > (particularly for ProcessPoolExecutor), but I found it to be well worth the > effort! Both for the benefit of the new feature, and for the opportunity to > work with a part of the internals of the executors. > > On Wed, Jan 15, 2020 at 5:59 PM Kyle Stanley <aeros...@gmail.com> wrote: > >> > Is anyone else interested in implementing this small feature for >> concurrent.futures? >> >> I would certainly be willing to look into it. We've been discussing the >> possibility of a native threadpool for asyncio in the future ( >> https://bugs.python.org/issue32309), so it would certainly be beneficial >> for me to build some experience in working with the internals of the >> executors. I think implementing this small feature would be a good >> introduction. >> >> On Wed, Jan 15, 2020 at 5:37 PM Guido van Rossum <gu...@python.org> >> wrote: >> >>> (Belatedly) >>> >>> Is anyone else interested in implementing this small feature for >>> concurrent.futures? >>> >>> On Fri, Jan 3, 2020 at 18:28 Miguel Ángel Prosper < >>> miguelangel.pros...@gmail.com> wrote: >>> >>>> > It looks like you have a good handle on the code -- do you want to >>>> submit a PR to GitHub to add such a parameter? >>>> >>>> Thanks, but I'm not really sure how to implement it in the >>>> ProcessPoolExecutor, I just think the solution is probably related to the >>>> code responsible of handling a failed initializer (since they do very >>>> similar things). On the ThreadPoolExecutor maybe I could, but I haven't >>>> really checked for side effects or weird things. >>>> _______________________________________________ >>>> Python-ideas mailing list -- python-ideas@python.org >>>> To unsubscribe send an email to python-ideas-le...@python.org >>>> https://mail.python.org/mailman3/lists/python-ideas.python.org/ >>>> Message archived at >>>> https://mail.python.org/archives/list/python-ideas@python.org/message/FGTSBGTXW63SSXFQBASLCTXAT4M6RGGN/ >>>> Code of Conduct: http://python.org/psf/codeofconduct/ >>>> >>> -- >>> --Guido (mobile) >>> _______________________________________________ >>> Python-ideas mailing list -- python-ideas@python.org >>> To unsubscribe send an email to python-ideas-le...@python.org >>> https://mail.python.org/mailman3/lists/python-ideas.python.org/ >>> Message archived at >>> https://mail.python.org/archives/list/python-ideas@python.org/message/WSE2KMKFMPG2RYSJSGMRZPDJLM7DZKSG/ >>> Code of Conduct: http://python.org/psf/codeofconduct/ >>> >> -- --Guido (mobile)
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/MVZKXBRCHYSUKE6YQG7AF4J6YB54NQYI/ Code of Conduct: http://python.org/psf/codeofconduct/