CoWork: CoWork::FinLock now ignored if not in worker

git-svn-id: svn://ultimatepp.org/upp/trunk@11437 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2017-11-06 17:15:26 +00:00
parent 3ece1f4de6
commit dd5decee5e

View file

@ -77,8 +77,10 @@ CoWork::Pool::~Pool()
void CoWork::FinLock()
{
Pool::finlock = true;
GetPool().lock.Enter();
if(current) {
Pool::finlock = true;
GetPool().lock.Enter();
}
}
void CoWork::Pool::DoJob(MJob& job)
@ -99,6 +101,7 @@ void CoWork::Pool::DoJob(MJob& job)
LLOG("DoJob caught exception");
exc = std::current_exception();
}
CoWork::current = NULL;
if(!finlock)
lock.Enter();
if(!work)