ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/examples.git/commit/?id=6a31dd60dbfa802b64226d078bf9624e860f58d3

commit 6a31dd60dbfa802b64226d078bf9624e860f58d3
Author: Andy Williams <a...@andywilliams.me>
Date:   Thu Dec 21 16:00:29 2017 +0000

    eina: Fix futures for new core loop
---
 reference/c/eina/src/eina_future.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/reference/c/eina/src/eina_future.c 
b/reference/c/eina/src/eina_future.c
index 7e483af..58c7279 100644
--- a/reference/c/eina/src/eina_future.c
+++ b/reference/c/eina/src/eina_future.c
@@ -90,7 +90,7 @@ _delayed_value_reject(void *data, const Eina_Value value 
EINA_UNUSED)
    Eina_Promise *promise;
 
    promise = (Eina_Promise *)data;
-   eina_promise_reject(promise, EINA_ERROR_MAGIC_FAILED);
+   eina_promise_reject(promise, EINA_ERROR_NOT_IMPLEMENTED);
 
    return EINA_VALUE_EMPTY;
 }
@@ -113,7 +113,7 @@ _failed_future()
    eina_future_then_easy(eina_future_new(promise), .error = _error_print);
 
    // This future is basically a timer - wait 100ms and then resolve the 
promise above
-   eina_future_then_easy(efl_loop_timeout(efl_loop_main_get(EFL_LOOP_CLASS), 
0.1),
+   eina_future_then_easy(efl_loop_timeout(efl_loop_main_get(EFL_LOOP_CLASS), 
0.2),
                          .success = _delayed_value_reject, .data = promise);
 }
 
@@ -169,7 +169,7 @@ _delayed_int_future_get(double delay)
    promise = eina_promise_new(efl_loop_future_scheduler_get(loop),
                               _promise_cancel, NULL);
 
-   efl_add(EFL_LOOP_TIMER_CLASS, NULL,
+   efl_add(EFL_LOOP_TIMER_CLASS, loop,
            efl_loop_timer_interval_set(efl_added, delay),
            efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK,
                                   _timeout, promise));
@@ -219,7 +219,7 @@ _exit_cb(void *data EINA_UNUSED, const Eina_Value v 
EINA_UNUSED,
 static void
 _chained_future(void)
 {
-   eina_future_chain(_delayed_int_future_get(0.1),
+   eina_future_chain(_delayed_int_future_get(0.5),
                      eina_future_cb_console("Starting chain with: ", NULL),
                      {.cb = _chain_multiply_cb, .data = NULL},
                      eina_future_cb_console("  Multiplied by 2: ", NULL),

-- 


Reply via email to