def _cleanup(self):
        """ Cleanup resources (worker threads). """
        with self._lock:
            for queue in self._workers:
                queue.put((None, None, None, None))
                self._workers[queue].join(1)
                if self._workers[queue].is_alive():
                    logging.debug('WorkerPool: worker join timed-out.')
                try:
                    self._idle.remove(queue)
                except __HOLE__:
                    pass  # Never released due to some other issue...
            self._idle = []
            self._workers = {}
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.util/src/openmdao/util/wrkpool.py/WorkerPool._cleanup