def endLoop(self, useDriverLoop):
self._queue = []<EOL>self._driver.stop()<EOL>if useDriverLoop:<EOL><INDENT>self._driver.endLoop()<EOL><DEDENT>else:<EOL><INDENT>self._iterator = None<EOL><DEDENT>self.setBusy(True)<EOL>
Called by the engine to stop an event loop.