path: root/src/lib/ecore/ecore.c
diff options
authorCedric BAIL <cedric@efl.so>2013-02-18 14:32:51 +0100
committerCedric BAIL <cedric@efl.so>2013-02-18 14:38:33 +0100
commit91711d8a694e53a95d164645b774de568ae4322b (patch)
treef9779e4e7d2efee19a1242f5c8efd5ea61c4f808 /src/lib/ecore/ecore.c
parentEo: do not add the test when not building them. (diff)
ecore: add Ecore_Coroutine.
That work clearly was possible thanks to Leandro. If you want more information go to his blog : http://tia.mat.br/posts/async_io_with_coroutines/ . The main difference with his implementation is more portable and not thread safe. It does not have a custom swapcontext (would make sense as we don't need to save the sigcontext) so it will be less fast. If people are ready to contribute asm patch for that purpose I will be happy to apply them. As for portability this code should work on all architecture we already support thanks to a nice hack with setjmp/longjmp borowed from libcoroutine. We do use Fiber for Windows support, but as 1.8 is completely borken in that regard, this is theorical work only. Thinks left to do : - Eoify the API - Documentation - More tests - Add support for coroutine in fd handler - Add coroutine support to ecore_thread api - Write some example
Diffstat (limited to 'src/lib/ecore/ecore.c')
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index 5c9ad0cd28..3c5a1019a0 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -166,6 +166,7 @@ ecore_init(void)
+ _ecore_coroutine_init();
eina_condition_new(&_thread_cond, &_thread_mutex);
@@ -234,8 +235,9 @@ ecore_shutdown(void)
if (--_ecore_init_count != 0)
goto unlock;
if (_ecore_fps_debug) _ecore_fps_debug_shutdown();
+ _ecore_coroutine_shutdown();