summaryrefslogtreecommitdiff
path: root/src/LuaTask.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/LuaTask.cc')
-rw-r--r--src/LuaTask.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/LuaTask.cc b/src/LuaTask.cc
index a549563..cc0bb60 100644
--- a/src/LuaTask.cc
+++ b/src/LuaTask.cc
@@ -101,11 +101,18 @@ void Balau::LuaTask::Do() {
}
void Balau::LuaExecCell::exec(LuaMainTask * mainTask) {
+ if (m_running)
+ return;
+ m_running = true;
if (!m_detached)
Task::prepare(&m_event);
mainTask->exec(this);
if (!m_detached)
- Task::operationYield(&m_event);
+ Task::operationYield(&m_event, Task::INTERRUPTIBLE);
+}
+
+void Balau::LuaExecCell::exec(Lua & L) {
+ exec(LuaMainTask::getMainTask(L));
}
void Balau::LuaExecCell::throwError() throw (GeneralException) {