Commit 68dde513 authored by Vishesh Handa's avatar Vishesh Handa
Browse files

FileIndexer: Fix a deadlock by making the mutex recursive

The following deadlock occurs during the first run of the
nepomuk-fileindexer, if you're on batery

QMutex::lockInternal()
QMutexLocker::QMutexLocker
Nepomuk2::IndexScheduler::suspend
Nepomuk2::EventMonitor::pauseIndexing
QMetaObject::activate(QObject*, QMetaObject
Nepomuk2::IndexScheduler::indexingSuspended
Nepomuk2::IndexScheduler::suspend
Nepomuk2::EventMonitor::pauseIndexing
Nepomuk2::EventMonitor::slotPowerManagementStatusChanged
Nepomuk2::EventMonitor::EventMonitor
Nepomuk2::FileIndexer::FileIndexer

This only happens during first run cause that is when the EventMonitor
is connected to the IndexScheduler

BUG: 304982
REVIEW: 106230
parent fc52f807
......@@ -165,6 +165,7 @@ Nepomuk2::IndexScheduler::IndexScheduler( QObject* parent )
: QObject( parent ),
m_suspended( false ),
m_indexing( false ),
m_suspendMutex( QMutex::Recursive ),
m_indexingDelay( 0 ),
m_currentIndexerJob( 0 )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment