code: def submit(self, func, *args, **kwargs):
          
          with self._shutdown_lock:
              if self._shutdown:
                  raise RuntimeError(
                      'cannot schedule new futures after shutdown')
              if self.in_green_worker:
                  return wait(func(*args, **kwargs))
              else:
                  future = create_future(self._loop)
                  self._put((future, func, args, kwargs))
                  return future
docs: Equivalent to ``func(*args, **kwargs)``.
  
          This method create a new task for function ``func`` and adds it to
          the queue.
          Return a :class:`~asyncio.Future` called back once the task
          has finished.