diff Core/Lua/LuaContext.cpp @ 996:cf52f3bcb2b3 lua-scripting

clarification of Lua classes wrt multithreading
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 03 Jul 2014 16:27:16 +0200
parents a811bdf8b8eb
children b067017a8a5b
line wrap: on
line diff
--- a/Core/Lua/LuaContext.cpp	Thu Jul 03 15:58:53 2014 +0200
+++ b/Core/Lua/LuaContext.cpp	Thu Jul 03 16:27:16 2014 +0200
@@ -34,6 +34,7 @@
 #include "LuaContext.h"
 
 #include <glog/logging.h>
+#include <cassert>
 
 extern "C" 
 {
@@ -111,8 +112,6 @@
   void LuaContext::Execute(std::string* output,
                            const std::string& command)
   {
-    boost::mutex::scoped_lock lock(mutex_);
-
     log_.clear();
     int error = (luaL_loadbuffer(lua_, command.c_str(), command.size(), "line") ||
                  lua_pcall(lua_, 0, 0, 0));
@@ -143,7 +142,6 @@
 
   bool LuaContext::IsExistingFunction(const char* name)
   {
-    boost::mutex::scoped_lock lock(mutex_);
     lua_settop(lua_, 0);
     lua_getglobal(lua_, name);
     return lua_type(lua_, -1) == LUA_TFUNCTION;