

def submit(self, fn, *args, **kwargs):
    with self._shutdown_lock:
        if self._shutdown:
            raise RuntimeError('cannot schedule new futures after shutdown')
    f = futures.Future()
    t = threading.Thread(target=_worker, args=(f, fn, args, kwargs))
    t.start()
    return f

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/thread_executor.py ThreadExecutor.submit/original