def process(self):
assert self.queue is not None<EOL>while True:<EOL><INDENT>event = self.queue.get()<EOL>if self.pre_process_event(event):<EOL><INDENT>self.invoke_handlers(event)<EOL><DEDENT>self.queue.task_done()<EOL><DEDENT>
Loops over the underlying queue of events and processes them in order.