forked from enlightenment/efl
eio: simplify code by using proper helper.
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/D7334
This commit is contained in:
parent
bf445d2476
commit
959024ae80
|
@ -417,8 +417,7 @@ _build_delay(Efl_Loop *loop)
|
||||||
{
|
{
|
||||||
Eina_Promise *p;
|
Eina_Promise *p;
|
||||||
|
|
||||||
p = eina_promise_new(efl_loop_future_scheduler_get(loop),
|
p = efl_loop_promise_new(loop, _cancel_request, NULL);
|
||||||
_cancel_request, NULL);
|
|
||||||
|
|
||||||
if (!delayed_queue)
|
if (!delayed_queue)
|
||||||
{
|
{
|
||||||
|
@ -684,8 +683,7 @@ _eio_model_efl_model_property_set(Eo *obj,
|
||||||
|
|
||||||
if (finalized)
|
if (finalized)
|
||||||
{
|
{
|
||||||
Eina_Promise *p = eina_promise_new(efl_loop_future_scheduler_get(loop),
|
Eina_Promise *p = efl_loop_promise_new(loop, _efl_io_manager_future_cancel, NULL);
|
||||||
_efl_io_manager_future_cancel, NULL);
|
|
||||||
f = eina_future_new(p);
|
f = eina_future_new(p);
|
||||||
|
|
||||||
pd->request.move = eio_file_move(pd->path, path,
|
pd->request.move = eio_file_move(pd->path, path,
|
||||||
|
|
Loading…
Reference in New Issue