diff --git a/src/modules/thread/wrap_Thread.cpp b/src/modules/thread/wrap_Thread.cpp index 631ec1a8a..62aa59cab 100644 --- a/src/modules/thread/wrap_Thread.cpp +++ b/src/modules/thread/wrap_Thread.cpp @@ -204,7 +204,9 @@ namespace thread return luaL_error(L, "Expected boolean, number, string or userdata"); } t->set(name, v); + t->lock(); v->release(); + t->unlock(); return 0; }