forked from enlightenment/efl
eina: fix promise scheduler lookup to find it when given a resolved chain of future.
T6738
This commit is contained in:
parent
da798e4528
commit
07e5064e15
|
@ -663,9 +663,15 @@ _dummy_cancel(void *data EINA_UNUSED, const Eina_Promise *dead_ptr EINA_UNUSED)
|
|||
static Eina_Future_Scheduler *
|
||||
_scheduler_get(Eina_Future *f)
|
||||
{
|
||||
for (; f->prev != NULL; f = f->prev);
|
||||
assert(f->promise != NULL);
|
||||
return f->promise->scheduler;
|
||||
do
|
||||
{
|
||||
if (f->promise) return f->promise->scheduler;
|
||||
else if (f->scheduled_entry) return f->scheduled_entry->scheduler;
|
||||
f = f->prev;
|
||||
}
|
||||
while (f);
|
||||
assert(EINA_FALSE && "no scheduler for future!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EAPI Eina_Value
|
||||
|
|
Loading…
Reference in New Issue