cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=959024ae8022819c03dd7b67f801865b72c0ea4d

commit 959024ae8022819c03dd7b67f801865b72c0ea4d
Author: Cedric BAIL <[email protected]>
Date:   Thu Nov 22 16:44:37 2018 -0800

    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 <[email protected]>
    Reviewed-by: Vitor Sousa da Silva <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D7334
---
 src/lib/eio/eio_model.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index bf25c4cde8..b01e961f8d 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -417,8 +417,7 @@ _build_delay(Efl_Loop *loop)
 {
    Eina_Promise *p;
 
-   p = eina_promise_new(efl_loop_future_scheduler_get(loop),
-                        _cancel_request, NULL);
+   p = efl_loop_promise_new(loop, _cancel_request, NULL);
 
    if (!delayed_queue)
      {
@@ -684,8 +683,7 @@ _eio_model_efl_model_property_set(Eo *obj,
 
    if (finalized)
      {
-        Eina_Promise *p = eina_promise_new(efl_loop_future_scheduler_get(loop),
-                                           _efl_io_manager_future_cancel, 
NULL);
+        Eina_Promise *p = efl_loop_promise_new(loop, 
_efl_io_manager_future_cancel, NULL);
         f = eina_future_new(p);
 
         pd->request.move = eio_file_move(pd->path, path,

-- 


Reply via email to