summaryrefslogtreecommitdiff
path: root/src/lib/eio/eio_model.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-11-22 16:44:37 -0800
committerCedric BAIL <cedric@osg.samsung.com>2018-11-30 14:58:08 -0800
commit959024ae8022819c03dd7b67f801865b72c0ea4d (patch)
tree447116b004dad0dee59723de02cfb4273e9f4b5d /src/lib/eio/eio_model.c
parentbf445d2476168ea57433c01a9a3f6107c87dc782 (diff)
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
Diffstat (limited to 'src/lib/eio/eio_model.c')
-rw-r--r--src/lib/eio/eio_model.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index bf25c4c..b01e961 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -417,8 +417,7 @@ _build_delay(Efl_Loop *loop)
417{ 417{
418 Eina_Promise *p; 418 Eina_Promise *p;
419 419
420 p = eina_promise_new(efl_loop_future_scheduler_get(loop), 420 p = efl_loop_promise_new(loop, _cancel_request, NULL);
421 _cancel_request, NULL);
422 421
423 if (!delayed_queue) 422 if (!delayed_queue)
424 { 423 {
@@ -684,8 +683,7 @@ _eio_model_efl_model_property_set(Eo *obj,
684 683
685 if (finalized) 684 if (finalized)
686 { 685 {
687 Eina_Promise *p = eina_promise_new(efl_loop_future_scheduler_get(loop), 686 Eina_Promise *p = efl_loop_promise_new(loop, _efl_io_manager_future_cancel, NULL);
688 _efl_io_manager_future_cancel, NULL);
689 f = eina_future_new(p); 687 f = eina_future_new(p);
690 688
691 pd->request.move = eio_file_move(pd->path, path, 689 pd->request.move = eio_file_move(pd->path, path,