[PATCH v15 08/15] event: Add an event for main_loop