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.

classification
Title: concurrent.futures.threading: Add a timeout to Executor shutdown() method
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Patrik Dufresne, pitrou
Priority: normal Keywords:

Created on 2016-09-06 18:49 by Patrik Dufresne, last changed 2022-04-11 14:58 by admin.

Messages (1)
msg274599 - (view) Author: Patrik Dufresne (Patrik Dufresne) Date: 2016-09-06 18:49
Would be nice to add a new parameter to timeout if the shutdown take too long.


    def shutdown(self, wait=True, timeout=None):
        with self._shutdown_lock:
            self._shutdown = True
            self._work_queue.put(None)
        if wait:
            for t in self._threads:
                start = time.time()
                t.join(timeout)
                timeout = timeout + start - time.time()
History
Date User Action Args
2022-04-11 14:58:35adminsetgithub: 72165
2021-09-26 21:19:09vstinnersettitle: [threading] Executor#shutdown with timeout -> concurrent.futures.threading: Add a timeout to Executor shutdown() method
2019-04-28 09:08:31cheryl.sabellasetnosy: + pitrou
title: Executor#shutdown with timeout -> [threading] Executor#shutdown with timeout

versions: + Python 3.8, - Python 3.5
2016-09-06 18:49:39Patrik Dufresnecreate