diff options
author | David Walter Seikel | 2014-08-10 04:21:24 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-08-10 04:21:24 +1000 |
commit | 12ab4c4aaf9c6e4037a0ffb88b2e8615cbc4d830 (patch) | |
tree | 2dd16cd4526fab525ec4d127181d9a1c565e07d3 /src/libraries/Runnr.c | |
parent | Quick and dirty crashing compiler catcher. (diff) | |
download | SledjHamr-12ab4c4aaf9c6e4037a0ffb88b2e8615cbc4d830.zip SledjHamr-12ab4c4aaf9c6e4037a0ffb88b2e8615cbc4d830.tar.gz SledjHamr-12ab4c4aaf9c6e4037a0ffb88b2e8615cbc4d830.tar.bz2 SledjHamr-12ab4c4aaf9c6e4037a0ffb88b2e8615cbc4d830.tar.xz |
Thread all of compiling, or thread nothing.
Diffstat (limited to 'src/libraries/Runnr.c')
-rw-r--r-- | src/libraries/Runnr.c | 12 |
1 files changed, 9 insertions, 3 deletions
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) | |||
471 | printf("Can't create a new Lua state!\n"); | 471 | printf("Can't create a new Lua state!\n"); |
472 | } | 472 | } |
473 | 473 | ||
474 | ecore_thread_feedback(thread, compiler); | 474 | if (thread) |
475 | ecore_thread_feedback(thread, compiler); | ||
476 | else | ||
477 | _compileNotify(compiler, thread, NULL); | ||
475 | } | 478 | } |
476 | 479 | ||
477 | void compileScript(LuaCompiler *compiler) | 480 | void compileScript(LuaCompiler *compiler, int threadIt) |
478 | { | 481 | { |
479 | ecore_thread_feedback_run(_compileThread, _compileNotify, NULL, NULL, compiler, EINA_FALSE); | 482 | if (threadIt) |
483 | ecore_thread_feedback_run(_compileThread, _compileNotify, NULL, NULL, compiler, EINA_FALSE); | ||
484 | else | ||
485 | _compileThread(compiler, NULL); | ||
480 | } | 486 | } |
481 | 487 | ||
482 | // Assumes the scripts mutex is taken already. | 488 | // Assumes the scripts mutex is taken already. |