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