From 895f56aa64f4a1ce149f373a75895d0ab0636ed2 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 4 Nov 2016 19:11:10 +0900 Subject: [PATCH] ecore main loop - drive the free queue from the loops idle enterer this will drive the free queue and make sure an idler will run through pending frees once the loop has gone idle. --- src/lib/ecore/ecore_idler.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c index d8eadaa273..06f3965a18 100644 --- a/src/lib/ecore/ecore_idler.c +++ b/src/lib/ecore/ecore_idler.c @@ -117,6 +117,11 @@ void _ecore_idler_all_call(Eo *loop) { efl_event_callback_call(loop, EFL_LOOP_EVENT_IDLE, NULL); + // just spin in an idler until the free queue is empty freeing 84 items + // from the free queue each time.for now this seems like an ok balance + // between going in and out of a reduce func with mutexes around it + // vs blocking mainloop for too long. this number is up for discussion + eina_freeq_reduce(eina_freeq_main_get(), 84); } int @@ -124,5 +129,5 @@ _ecore_idler_exist(Eo *loop) { Efl_Loop_Data *dt = efl_data_scope_get(loop, EFL_LOOP_CLASS); - return dt->idlers; + return dt->idlers || eina_freeq_ptr_pending(eina_freeq_main_get()); }