def shutdown()

in datahub/client/common/thread_pool.py [0:0]


    def shutdown(self, wait_done=True, cancel_futures=False):
        with self._shut_down_lock:
            if self._shut_down:
                return

            self._shut_down = True

            if cancel_futures:
                while True:
                    try:
                        task = self._queue.get_nowait()
                    except queue.Empty:
                        break

                    if task is not None:
                        task.future.cancel()

            if wait_done:
                list(map(lambda th: th.join(), self._workers))
            self._workers.clear()