MCPcopy Create free account
hub / github.com/KDE/kdevelop / waitForIdle

Method waitForIdle

kdevplatform/language/backgroundparser/backgroundparser.cpp:898–923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

896}
897
898bool BackgroundParser::waitForIdle() const
899{
900 Q_D(const BackgroundParser);
901
902 QList<IndexedString> runningParseJobsUrls;
903 while (true) {
904 {
905 QMutexLocker lock(&d->m_mutex);
906 if (d->m_parseJobs.isEmpty()) {
907 qCDebug(LANGUAGE) << "All parse jobs done" << d->m_parseJobs.keys();
908 return true;
909 }
910
911 if (d->m_parseJobs.size() != runningParseJobsUrls.size()) {
912 runningParseJobsUrls = d->m_parseJobs.keys();
913 qCDebug(LANGUAGE) <<
914 "Waiting for background parser to get in idle state... -- the following parse jobs are still running:"
915 << runningParseJobsUrls;
916 }
917 }
918
919 QCoreApplication::processEvents();
920 QThread::msleep(100);
921 }
922 return false;
923}
924
925DocumentChangeTracker* BackgroundParser::trackerForUrl(const KDevelop::IndexedString& url) const
926{

Callers 1

cleanupMethod · 0.80

Calls 3

isEmptyMethod · 0.45
keysMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected