Skip to content

Instantly share code, notes, and snippets.

@gen2brain
Last active March 27, 2026 16:31
Show Gist options
  • Select an option

  • Save gen2brain/8ed03d6eef620cc25007b5d7a5cc5779 to your computer and use it in GitHub Desktop.

Select an option

Save gen2brain/8ed03d6eef620cc25007b5d7a5cc5779 to your computer and use it in GitHub Desktop.
diff '--color=auto' -ur efl.orig/src/lib/ecore/efl_loop.c efl/src/lib/ecore/efl_loop.c
--- efl.orig/src/lib/ecore/efl_loop.c 2025-03-17 16:43:43.000000000 +0100
+++ efl/src/lib/ecore/efl_loop.c 2026-03-27 17:07:58.288322245 +0100
@@ -639,6 +639,24 @@
EOAPI EFL_FUNC_BODY(efl_loop_message_process, Eina_Bool, 0);
+EOLIAN static void
+_efl_loop_message_pending_flush(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd)
+{
+ Message *msg;
+
+ while (pd->message_pending_queue)
+ {
+ msg = (Message *)pd->message_pending_queue;
+ pd->message_pending_queue = eina_inlist_remove(pd->message_pending_queue,
+ pd->message_pending_queue);
+ if ((msg->handler) && (msg->message) && (!msg->delete_me))
+ pd->message_queue = eina_inlist_append(pd->message_queue,
+ EINA_INLIST_GET(msg));
+ else
+ free(msg);
+ }
+}
+
EWAPI void
efl_build_version_set(int vmaj, int vmin, int vmic, int revision,
const char *flavor, const char *build_id)
diff '--color=auto' -ur efl.orig/src/lib/ecore/efl_loop.eo efl/src/lib/ecore/efl_loop.eo
--- efl.orig/src/lib/ecore/efl_loop.eo 2025-03-17 16:43:43.000000000 +0100
+++ efl/src/lib/ecore/efl_loop.eo 2026-03-27 17:26:40.738347320 +0100
@@ -105,6 +105,14 @@
}
return: future<void> @move; [[The future handle.]]
}
+ message_pending_flush {
+ [[Flush pending messages into the main message queue.
+
+ Moves messages from the pending queue to the main queue immediately.
+ Use this before @.iterate when driving the loop manually instead
+ of @.begin, for example to implement caller-controlled nested loops.
+ ]]
+ }
}
events {
idle,enter @restart: void; [[Event occurs once the main loop enters the idle state.]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment