mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-02 06:06:59 -06:00
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:
parent
3ece1f4de6
commit
dd5decee5e
1 changed files with 5 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue