class_docstr: MPI-based asynchronous executor.
class_docstr_tok: ["MPI-based","asynchronous","executor","."]
docstr: Clean-up the resources associated with the executor.
  
  It is safe to call this method several times. Otherwise, no other
  methods can be called after this one.
  
  Args:
      wait: If ``True`` then shutdown will not return until all running
          futures have finished executing and the resources used by the
          executor have been reclaimed.
      cancel_futures: If ``True`` then shutdown will cancel all pending
          futures. Futures that are completed or running will not be
          cancelled.
docstr_tok: ["Clean-up","the","resources","associated","with","the","executor",".","It","is","safe","to","call","this","method","several","times",".","Otherwise",",","no","other","methods","can","be","called","after","this","one",".","Args",":","wait",":","If","``","True","``","then","shutdown","will","not","return","until","all","running","futures","have","finished","executing","and","the","resources","used","by","the","executor","have","been","reclaimed",".","cancel_futures",":","If","``","True","``","then","shutdown","will","cancel","all","pending","futures",".","Futures","that","are","completed","or","running","will","not","be","cancelled","."]
code: def shutdown(self, wait=True, *, cancel_futures=False):
      """Clean-up the resources associated with the executor.
  
      It is safe to call this method several times. Otherwise, no other
      methods can be called after this one.
  
      Args:
          wait: If ``True`` then shutdown will not return until all running
              futures have finished executing and the resources used by the
              executor have been reclaimed.
          cancel_futures: If ``True`` then shutdown will cancel all pending
              futures. Futures that are completed or running will not be
              cancelled.
  
      """
      with self._lock:
          if not self._shutdown:
              self._shutdown = True
              if self._pool is not None:
                  self._pool.done()
          if cancel_futures:
              if self._pool is not None:
                  self._pool.cancel()
          pool = None
          if wait:
              pool = self._pool
              self._pool = None
      if pool is not None:
          pool.join()
  
imports: import sys
  import time
  import functools
  import itertools
  import threading
  from ._base import Future
  from ._base import Executor
  from ._base import as_completed
  from .None import _core
label_desc: Use image node_id 9 for calling the MPIPoolExecutor obj's underlying member method code with example usage: obj.shutdown(wait) without return types