class_docstr: A concurrent.futures Executor that executes tasks on a dask.distributed Client.
class_docstr_tok: ["A","concurrent.futures","Executor","that","executes","tasks","on","a","dask.distributed","Client","."]
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.
  
  Parameters
  ----------
  wait : If True then shutdown will not return until all running
      futures have finished executing.  If False then all running
      futures are cancelled immediately.
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",".","Parameters","--","--","--","--","--","wait",":","If","True","then","shutdown","will","not","return","until","all","running","futures","have","finished","executing",".","If","False","then","all","running","futures","are","cancelled","immediately","."]
code: def shutdown(self, wait=True):
      """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.
  
      Parameters
      ----------
      wait : If True then shutdown will not return until all running
          futures have finished executing.  If False then all running
          futures are cancelled immediately.
      """
      if not self._shutdown:
          self._shutdown = True
          fs = list(self._futures)
          if wait:
              sync(self._client.loop, _wait_on_futures, fs)
          else:
              self._client.cancel(fs)
  
file_path: distributed/distributed/cfexecutor.py
imports: from __future__ import annotations
  import concurrent.futures
  import weakref
  from tlz import merge
  from tornado import gen
  from dask.utils import parse_timedelta
  from distributed.metrics import time
  from distributed.utils import TimeoutError, sync
label_desc: Use image node_id 5 for calling the ClientExecutor obj's underlying member method code with example usage: obj.shutdown(wait) without return types