} set;
Eina_Bool optional : 1;
+ Eina_Bool propagating : 1;
};
static void
static void
_efl_loop_future_cancel(Eo *obj, Efl_Loop_Future_Data *pd)
{
+ // We do allow for calling cancel during the propagation phase
+ // as the other proper fix is to wype out all future reference before
+ // starting propagating things.
+ if (pd->promise && pd->promise->propagating) return;
+
// Check state
if (pd->fulfilled)
{
pd->message = message;
// Send it to all futures
+ pd->propagating = EINA_TRUE;
EINA_LIST_FOREACH_SAFE(pd->futures, l, ln, f)
{
EINA_REFCOUNT_REF(message);
// Trigger the callback
_efl_loop_future_propagate(f->self, f);
}
+ pd->propagating = EINA_FALSE;
// Now, we may die.
efl_unref(obj);
pd->message = message;
// Send it to each future
+ pd->propagating = EINA_TRUE;
EINA_LIST_FOREACH_SAFE(pd->futures, l, ln, f)
{
EINA_REFCOUNT_REF(message);
// Trigger the callback
_efl_loop_future_propagate(f->self, f);
}
+ pd->propagating = EINA_FALSE;
// Now, we may die.
efl_unref(obj);