# File lib/mongrel_config/win32.rb, line 24
  def W32Support.do_and_wait(service_name, operation, wait_for)
    status = W32Support.status(service_name)
    if status =~ wait_for
      # already running call the block once and leave
      yield status
    else
      # start trying to start it
      Win32::Service.send(operation, service_name)
      status = W32Support.status(service_name)
      while status !~ wait_for
        yield status
        status = W32Support.status(service_name)
      end

      # do one last yield so they know it started
      yield status
    end
  end