code: def endLoop(self, useDriverLoop):
          '''
          Called by the engine to stop an event loop.
          '''
          self._queue = []
          self._driver.stop()
          if useDriverLoop:
              self._driver.endLoop()
          else:
              self._iterator = None
          self.setBusy(Truef endLoop(self, useDriverLoop):
          '''
          Called by the engine to stop an event loop.
          '''
          self._queue = []
          self._driver.stop()
          if useDriverLoop:
              self._driver.endLoop()
          else:
              self._iterator = None
          self.setBusy(True)
docs: Called by the engine to stop an event loop.