class_docstr: MPI-based asynchronous executor.
class_docstr_tok: ["MPI-based","asynchronous","executor","."]
docstr: Submit a callable to be executed with the given arguments.
  
  Schedule the callable to be executed as ``fn(*args, **kwargs)`` and
  return a `Future` instance representing the execution of the callable.
  
  Returns:
      A `Future` representing the given call.
docstr_tok: ["Submit","a","callable","to","be","executed","with","the","given","arguments",".","Schedule","the","callable","to","be","executed","as","``","fn","(","*","args",",","*","*","kwargs",")","``","and","return","a","`","Future","`","instance","representing","the","execution","of","the","callable",".","Returns",":","A","`","Future","`","representing","the","given","call","."]
code: def submit(self, fn, *args, **kwargs):
      """Submit a callable to be executed with the given arguments.
  
      Schedule the callable to be executed as ``fn(*args, **kwargs)`` and
      return a `Future` instance representing the execution of the callable.
  
      Returns:
          A `Future` representing the given call.
  
      """
      # pylint: disable=arguments-differ
      with self._lock:
          if self._broken:
              raise _core.BrokenExecutor(self._broken)
          if self._shutdown:
              raise RuntimeError("cannot submit after shutdown")
          self._bootstrap()
          future = self.Future()
          task = (fn, args, kwargs)
          self._pool.push((future, task))
          return future
  
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 6 for calling the MPIPoolExecutor obj's underlying member method code with example usage: obj.submit(fn) and returns: future