efl_loop_promise_new is a helper function that does automatically figure out an
available scheduler and create a promise from it. Basically replacing the call to
eina_promise_new(efl_loop_future_scheduler_get(o), ...).
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7335
return eina_future_resolved(efl_loop_future_scheduler_get(obj), v);
}
- p = eina_promise_new(efl_loop_future_scheduler_get(obj),
- _eldbus_eina_promise_cancel, NULL);
+ p = efl_loop_promise_new(obj, _eldbus_eina_promise_cancel, NULL);
slice = calloc(1, sizeof (Eldbus_Children_Slice_Promise));
slice->p = p;
return eina_future_resolved(efl_loop_future_scheduler_get(obj), v);
}
- p = eina_promise_new(efl_loop_future_scheduler_get(obj),
- _eldbus_eina_promise_cancel, NULL);
+ p = efl_loop_promise_new(obj, _eldbus_eina_promise_cancel, NULL);
slice = calloc(1, sizeof(struct _Eldbus_Children_Slice_Promise));
slice->p = p;
if (!data) goto on_error;
data->pd = pd;
- data->promise = eina_promise_new(efl_loop_future_scheduler_get(obj),
- _eldbus_model_proxy_cancel_cb, data);
+ data->promise = efl_loop_promise_new(obj, _eldbus_model_proxy_cancel_cb, data);
data->property = eina_stringshare_add(property);
if (!(data->value = eina_value_dup(value))) goto on_error;