code: def submit_work_and_wait(self, work, workunit_parent=None):
      
      if work is None or len(work.args_tuples) == 0:  # map hangs on 0-length iterables.
        return []
      else:
        def do_work(*args):
          return self._do_work(work.func, *args, workunit_name=work.workunit_name,
                               workunit_parent=workunit_parent)
        # We need to specify a timeout explicitly, because otherwise python ignores SIGINT when waiting
        # on a condition variable, so we won't be able to ctrl-c out.
        return self._pool.map_async(do_work, work.args_tuples, chunksize=1).get(timeout=1000000000)
docs: Submit work to be executed on this pool, but wait for it to complete.
  
      - work: The work to execute.
      - workunit_parent: If specified, work is accounted for under this workunit.
  
      Returns a list of return values of each invocation, in order.  Throws if any invocation does.