From ef166eff148017255983198a137cd60a9a224025 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Wed, 21 Dec 2016 11:33:10 -0800 Subject: [PATCH] ecore: we need to process future and promise before the internal start loop. --- src/lib/ecore/ecore_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index d676ae4..640be7d 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -2317,6 +2317,16 @@ _ecore_main_loop_iterate_internal(int once_only) /* start of the sleeping or looping section */ start_loop: /*-*************************************************************/ + /* We could be looping here without exiting the function and we need to + process future and promise before the next waiting period. */ + /* destroy all optional futures */ + EINA_LIST_FREE(_pending_futures, f) + efl_del(f); + + /* and propagate all promise value */ + EINA_LIST_FREE(_pending_promises, p) + ecore_loop_promise_fulfill(p); + /* any timers re-added as a result of these are allowed to go */ _efl_loop_timer_enable_new(); /* if we have been asked to quit the mainloop then exit at this point */ -- 2.7.4