def _loop(self):
while True:<EOL><INDENT>try:<EOL><INDENT>with uncaught_greenlet_exception_context():<EOL><INDENT>self._loop_callback()<EOL><DEDENT><DEDENT>except gevent.GreenletExit:<EOL><INDENT>break<EOL><DEDENT>if self._stop_event.wait(self._interval):<EOL><INDENT>break<EOL><DEDENT><DEDENT>self._clear()<EOL>
Main loop - used internally.