class_docstr: A helper class for managing pool of workers.
class_docstr_tok: ["A","helper","class","for","managing","pool","of","workers","."]
docstr: Shutdown the process or thread pool
code: def terminate(self):
      """Shutdown the process or thread pool"""
      if self._pool is not None:
          self._pool.close()
          self._pool.terminate()  # terminate does a join()
          self._pool = None
  
imports: import gc
  import os
  import sys
  import warnings
  import threading
  from abc import ABCMeta, abstractmethod
  from .format_stack import format_exc
  from .my_exceptions import WorkerInterrupt, TransportableException
  from ._multiprocessing_helpers import mp
  from ._compat import with_metaclass
label_desc: Use image node_id 2 for calling the PoolManagerMixin obj's underlying member method code with example usage: obj.terminate() without return types