Peek gets locks too

This commit is contained in:
Bart van Strien
2011-02-11 19:50:34 +01:00
parent eee4e0576c
commit fd34409bd4
+2
View File
@@ -166,7 +166,9 @@ namespace sdl
{
Thread *t = luax_checkthread(L, 1);
std::string name = luax_checklstring(L, 2);
t->lock();
ThreadVariant *v = t->receive(name);
t->unlock();
if (!v)
{
lua_pushnil(L);