Fix destructor race in Job

This commit is contained in:
Vinnie Falco
2016-02-19 19:08:24 -05:00
parent 92391332d7
commit 9ab5611c65
3 changed files with 40 additions and 30 deletions

View File

@@ -80,6 +80,10 @@ void Job::doJob ()
m_loadEvent->reName (mName);
mJob (*this);
// Destroy the lambda, otherwise we won't include
// its duration in the time measurement
mJob = std::function<void(Job&)>();
}
void Job::rename (std::string const& newName)