diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-11-04 19:11:10 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-11-06 13:13:10 +0900 |
commit | 895f56aa64f4a1ce149f373a75895d0ab0636ed2 (patch) | |
tree | 12b6c5ef28bce29fd6a31088dd9b71ad683a6c71 | |
parent | 0ee33e7b4b3932756b017739b3a578c5198aa041 (diff) | |
download | efl-895f56aa64f4a1ce149f373a75895d0ab0636ed2.tar.gz |
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.
-rw-r--r-- | src/lib/ecore/ecore_idler.c | 7 |
1 files changed, 6 insertions, 1 deletions
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()); } |