On 09/03/2020 17:50, Remy NOEL wrote:
I ran into a problem which, according to a google search is not that
uncommon:
     concurrent.futures ThreadPoolExecutor, installs an exit handler
preventing program exit if any of the jobs it is running is blocked. (Which
might be a surprising behaviour to someone using those).

It is possible to workaround this problem by either unregistering the exit
handler concurrent.futures.thread._python_exit or by subclassing the
threadpoolExecutor and overriding the _adjust_thread_count method with one
that does not register its threads queues.

Both seems kinda ugly though.

Well, yes. The non-ugly thing would be to make sure your threads are well behaved ;-)

--
Rhodri James *-* Kynesim Ltd
_______________________________________________
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/375RETCU5EG37VFO5GL6CHTYFWFRXYTR/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to