[TD]prevent running threads on object delete

This commit is contained in:
Wanderer Fan
2022-08-17 18:21:06 -04:00
committed by WandererFan
parent e97b95341a
commit 6f646a8d2d
3 changed files with 19 additions and 0 deletions

View File

@@ -149,6 +149,11 @@ DrawViewSection::DrawViewSection() :
DrawViewSection::~DrawViewSection()
{
//don't destroy this object while it has dependent threads running
if (m_cutFuture.isRunning()) {
Base::Console().Message("%s is waiting for tasks to complete\n", getNameInDocument());
m_cutFuture.waitForFinished();
}
}
short DrawViewSection::mustExecute() const