From 6a31dd60dbfa802b64226d078bf9624e860f58d3 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Thu, 21 Dec 2017 16:00:29 +0000 Subject: [PATCH] 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 7e483afb..58c72795 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),