def clear_all_events(self):
        """Clear all event queues and their cached events."""
        self.lock.acquire()
        self.event_dict.clear()
        self.lock.release()
Clear all event queues and their cached events.