From 12ab4c4aaf9c6e4037a0ffb88b2e8615cbc4d830 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 10 Aug 2014 04:21:24 +1000 Subject: Thread all of compiling, or thread nothing. --- src/libraries/Runnr.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/libraries/Runnr.c') diff --git a/src/libraries/Runnr.c b/src/libraries/Runnr.c index 366c31a..e97fcee 100644 --- a/src/libraries/Runnr.c +++ b/src/libraries/Runnr.c @@ -471,12 +471,18 @@ static void _compileThread(void *data, Ecore_Thread *thread) printf("Can't create a new Lua state!\n"); } - ecore_thread_feedback(thread, compiler); + if (thread) + ecore_thread_feedback(thread, compiler); + else + _compileNotify(compiler, thread, NULL); } -void compileScript(LuaCompiler *compiler) +void compileScript(LuaCompiler *compiler, int threadIt) { - ecore_thread_feedback_run(_compileThread, _compileNotify, NULL, NULL, compiler, EINA_FALSE); + if (threadIt) + ecore_thread_feedback_run(_compileThread, _compileNotify, NULL, NULL, compiler, EINA_FALSE); + else + _compileThread(compiler, NULL); } // Assumes the scripts mutex is taken already. -- cgit v1.1