ecore: add promise for Ecore_Thread
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Fri, 1 Apr 2016 18:37:42 +0000 (15:37 -0300)
committerCedric Bail <cedric@osg.samsung.com>
Tue, 5 Apr 2016 18:35:12 +0000 (11:35 -0700)
commit887608e146b8e3952974182b2cc5a7009a711db5
tree69b1471411a09bb9e21db93bdc29d8ff5f64ab9d
parent1d314828f7bfdcbe220e39ae8b2cc5487e002afb
ecore: add promise for Ecore_Thread

Add ecore_thread_promise_run function that returns a Promise
and runs function in another thread which you can set the
value on a Eina_Promise_Owner.

Eina_Promise* promise;
Ecore_Thread* thread = ecore_thread_promise_run
( &function_heavy, &cancellation_function, private_data,
sizeof(ValueType), &promise);

This calls function_heavy on another thread and returns
the Ecore_Thread and a Eina_Promise as an out-parameter.

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
src/Makefile_Ecore.am
src/lib/ecore/Ecore_Common.h
src/lib/ecore/ecore_thread_promise.c [new file with mode: 0644]