Fixed more locking issues in love.thread

This commit is contained in:
Bart van Strien
2011-02-11 20:41:03 +01:00
parent fd34409bd4
commit 31f8c68b4b
+4 -4
View File
@@ -78,13 +78,13 @@ namespace sdl
std::string name = luax_checklstring(L, 2);
t->lock();
ThreadVariant *v = t->receive(name);
t->clear(name);
t->unlock();
if (!v)
{
lua_pushnil(L);
return 1;
}
t->clear(name);
t->unlock();
switch(v->type)
{
case BOOLEAN:
@@ -123,13 +123,13 @@ namespace sdl
std::string name = luax_checklstring(L, 2);
t->lock();
ThreadVariant *v = t->demand(name);
t->clear(name);
t->unlock();
if (!v)
{
lua_pushnil(L);
return 1;
}
t->clear(name);
t->unlock();
switch(v->type)
{
case BOOLEAN: