ecore: do not trigger future,none once value/cancel has been set.
authorCedric Bail <cedric@osg.samsung.com>
Fri, 16 Sep 2016 04:43:47 +0000 (21:43 -0700)
committerCedric Bail <cedric@osg.samsung.com>
Fri, 16 Sep 2016 04:49:08 +0000 (21:49 -0700)
This would have forced who ever used future,none signal to manually
filter out event triggered by all the future beeing fullfiled and
disconnecting once they receive a value or are marked failed.

src/lib/ecore/efl_promise.c

index cb4d47c..498accb 100644 (file)
@@ -275,7 +275,8 @@ _efl_loop_future_disconnect(Eo *obj, Efl_Loop_Future_Data *pd)
    pd->promise->futures = eina_list_remove(pd->promise->futures, pd);
 
    // Notify that there is no more future
-   if (!pd->promise->futures)
+   if (!pd->promise->futures &&
+       !pd->promise->message)
      {
         efl_event_callback_call(pd->promise->promise, EFL_PROMISE_EVENT_FUTURE_NONE, NULL);
      }