New submission from Patrik Dufresne:
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()
----------
components: Library (Lib)
messages: 274599
nosy: Patrik Dufresne
priority: normal
severity: normal
status: open
title: Executor#shutdown with timeout
type: enhancement
versions: Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue27978>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com