(self, func, *args, **kwargs)
Reimplemented from :class:`concurrent.futures.Executor`

        Schedule the `func(*args, **kwargs)` to be executed and return an
        :class:`Future` instance representing the result of the computation.
Reimplemented from :class:`concurrent.futures.Executor`
Reimplemented from : class : concurrent . futures . Executor
def submit(self, func, *args, **kwargs):
        """
        Reimplemented from :class:`concurrent.futures.Executor`

        Schedule the `func(*args, **kwargs)` to be executed and return an
        :class:`Future` instance representing the result of the computation.
        """
        with self._state_lock:
            if self._shutdown:
                raise RuntimeError("Cannot schedule new futures after " +
                                   "shutdown.")

            if isinstance(func, Task):
                warnings.warn("Use `submit_task` to run `Task`s",
                              DeprecationWarning, stacklevel=2)
                f, runnable = self.__make_task_runnable(func)
            else:
                f = Future()
                runnable = FutureRunnable(f, func, args, kwargs)

            self._futures.append(f)
            f.add_done_callback(self._future_done)
            self.__start(runnable)
            return f
def submit ( self , func , * args , * * kwargs ) : with self . _state_lock : if self . _shutdown : raise RuntimeError ( "Cannot schedule new futures after " + "shutdown." ) if isinstance ( func , Task ) : warnings . warn ( "Use `submit_task` to run `Task`s" , DeprecationWarning , stacklevel = 2 ) f , runnable = self . __make_task_runnable ( func ) else : f = Future ( ) runnable = FutureRunnable ( f , func , args , kwargs ) self . _futures . append ( f ) f . add_done_callback ( self . _future_done ) self . __start ( runnable ) return f