Skip to content

Commit

Permalink
Added predicate in cond.wait in TownsRenderingThread::ThreadFunc.
Browse files Browse the repository at this point in the history
  • Loading branch information
captainys committed Nov 25, 2021
1 parent 3856011 commit 1dfc169
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/towns/townsrenderthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void TownsRenderingThread::ThreadFunc(void)
std::unique_lock <std::mutex> mainLock(mainMutex);
for(;;)
{
cond.wait(mainLock);
cond.wait(mainLock,[&]{return NO_COMMAND!=command;});
if(QUIT==command)
{
break;
Expand Down

0 comments on commit 1dfc169

Please sign in to comment.