ecore: we need to process future and promise before the internal start loop.

This commit is contained in:
Cedric BAIL 2016-12-21 11:33:10 -08:00
parent 06e014959b
commit ef166eff14
1 changed files with 10 additions and 0 deletions

View File

@ -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 */