Skip to content
Permalink
Browse files

be sure that task has ended when deleted

  • Loading branch information
troopa81 authored and nyalldawson committed Feb 13, 2020
1 parent 046b1e8 commit 30937e73602bcf3c35da947a438bf10e90d04e5b
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/qgstaskmanager.cpp
@@ -36,7 +36,8 @@ QgsTask::QgsTask( const QString &name, Flags flags )
QgsTask::~QgsTask()
{
Q_ASSERT_X( mStatus != Running, "delete", QStringLiteral( "status was %1" ).arg( mStatus ).toLatin1() );
mNotFinishedMutex.tryLock(); // we're not guaranteed to already have the lock in place here
// even here we are not sure that task start method has ended
mNotFinishedMutex.lock();
const auto constMSubTasks = mSubTasks;
for ( const SubTask &subTask : constMSubTasks )
{

0 comments on commit 30937e7

Please sign in to comment.
You can’t perform that action at this time.