D15959: Wait for the extraction process to finish before scheduling

2018-10-20 Thread Igor Poboiko
poboiko abandoned this revision. poboiko added a comment. Dropped in favor of D16265: [Scheduler] Use flag to track when a runner is going idle , which handles this problem better. REPOSITORY R293 Baloo REVISION DETAIL https://phabricator.kde.org/D159

D15959: Wait for the extraction process to finish before scheduling

2018-10-12 Thread Stefan Brüns
bruns added a comment. In D15959#341722 , @poboiko wrote: > In D15959#339523 , @bruns wrote: > > > This works for me: > > > >void FileIndexScheduler::scheduleIndexing() > >{ > > -

D15959: Wait for the extraction process to finish before scheduling

2018-10-12 Thread Igor Poboiko
poboiko added a comment. In D15959#339523 , @bruns wrote: > This works for me: > >void FileIndexScheduler::scheduleIndexing() >{ > -if (m_threadPool.activeThreadCount() || m_indexerState == Suspended) { > +if (m_inde

D15959: Wait for the extraction process to finish before scheduling

2018-10-08 Thread Stefan Brüns
bruns added a comment. This works for me: void FileIndexScheduler::scheduleIndexing() { -if (m_threadPool.activeThreadCount() || m_indexerState == Suspended) { +if (m_indexerState == Suspended) { return; } REPOSITORY R293 Baloo REVISION DET

D15959: Wait for the extraction process to finish before scheduling

2018-10-06 Thread Stefan Brüns
bruns added a comment. I think the most trivial and completely correct way to fix this problem is to remove the `m_threadPool.activeThreadCount()` check from `scheduleIndexing()`. `QThreadPool::start(runnable)` puts the runnable in the run queue if there is still another thread running. REP

D15959: Wait for the extraction process to finish before scheduling

2018-10-06 Thread Igor Poboiko
poboiko added a comment. That doesn't looks like it works all the time: sometimes I still have this issue. Apparently, it still can happen that even when the process is finished, signal is emitted, but the thread is not finished yet. Also, it seems like due to `QueuedConnection`, `Ext

D15959: Wait for the extraction process to finish before scheduling

2018-10-05 Thread Igor Poboiko
poboiko created this revision. poboiko added reviewers: Baloo, Frameworks. Herald added projects: Frameworks, Baloo. Herald added a subscriber: kde-frameworks-devel. poboiko requested review of this revision. REVISION SUMMARY Right now, a race condition might happen. Signal `FileContentIndexer::