Skip to content
Permalink
Browse files
Avoid recursive locks
  • Loading branch information
nyalldawson committed Dec 5, 2016
1 parent 14b6b3f commit 01d6afaf2ce9254adae71fda32f92b609d0cab1b
Showing with 7 additions and 7 deletions.
  1. +6 −6 src/core/qgstaskmanager.cpp
  2. +1 −1 tests/src/core/testqgstaskmanager.cpp
@@ -279,12 +279,12 @@ void QgsTask::terminated()

QgsTaskManager::QgsTaskManager( QObject* parent )
: QObject( parent )
, mTaskMutex( new QReadWriteLock( QReadWriteLock::Recursive ) )
, mActiveTaskMutex( new QReadWriteLock( QReadWriteLock::Recursive ) )
, mParentTaskMutex( new QReadWriteLock( QReadWriteLock::Recursive ) )
, mSubTaskMutex( new QReadWriteLock( QReadWriteLock::Recursive ) )
, mDependenciesMutex( new QReadWriteLock( QReadWriteLock::Recursive ) )
, mLayerDependenciesMutex( new QReadWriteLock( QReadWriteLock::Recursive ) )
, mTaskMutex( new QReadWriteLock() )
, mActiveTaskMutex( new QReadWriteLock() )
, mParentTaskMutex( new QReadWriteLock() )
, mSubTaskMutex( new QReadWriteLock() )
, mDependenciesMutex( new QReadWriteLock() )
, mLayerDependenciesMutex( new QReadWriteLock() )
, mNextTaskId( 0 )
{
connect( QgsMapLayerRegistry::instance(), SIGNAL( layersWillBeRemoved( QStringList ) ),
@@ -24,7 +24,7 @@
#include <QtTest/QtTest>

//enable to allow fragile tests which intermittently fail
//#define WITH_FLAKY_TESTS
#define WITH_FLAKY_TESTS

class TestTask : public QgsTask
{

0 comments on commit 01d6afa

Please sign in to comment.