mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
More race conditions (bug #131)
This commit is contained in:
@@ -270,6 +270,7 @@ namespace sdl
|
||||
SDL_CondWait(cond, mutex);
|
||||
v = comm->getValue(name);
|
||||
}
|
||||
v->retain();
|
||||
unlock();
|
||||
return v;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,9 @@ namespace sdl
|
||||
lua_pushnil(L);
|
||||
break;
|
||||
}
|
||||
t->lock();
|
||||
v->release();
|
||||
t->unlock();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -123,7 +125,6 @@ namespace sdl
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
v->retain();
|
||||
t->clear(name);
|
||||
switch(v->type)
|
||||
{
|
||||
@@ -151,7 +152,9 @@ namespace sdl
|
||||
lua_pushnil(L);
|
||||
break;
|
||||
}
|
||||
t->lock();
|
||||
v->release();
|
||||
t->unlock();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -165,7 +168,6 @@ namespace sdl
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
v->retain();
|
||||
switch(v->type)
|
||||
{
|
||||
case BOOLEAN:
|
||||
@@ -192,7 +194,9 @@ namespace sdl
|
||||
lua_pushnil(L);
|
||||
break;
|
||||
}
|
||||
t->lock();
|
||||
v->release();
|
||||
t->unlock();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user