mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Make mutex locks slightly more safe in some places (and correct in another...)
This commit is contained in:
@@ -58,10 +58,11 @@ bool Thread::start()
|
||||
|
||||
void Thread::wait()
|
||||
{
|
||||
mutex.lock();
|
||||
if (!thread)
|
||||
return;
|
||||
mutex.unlock();
|
||||
{
|
||||
Lock l(mutex);
|
||||
if (!thread)
|
||||
return;
|
||||
}
|
||||
SDL_WaitThread(thread, 0);
|
||||
Lock l(mutex);
|
||||
running = false;
|
||||
|
||||
Reference in New Issue
Block a user