Review Request 118617: Add a BackgroundParser::isIdle method that returns whether there is no job queued or running

Denis Steckelmacher steckdenis at
Mon Jun 9 09:59:35 UTC 2014

This is an automatically generated e-mail. To reply, visit:

(Updated June 9, 2014, 9:59 a.m.)


This change has been marked as submitted.

Review request for KDevelop.

Repository: kdevplatform


BackgroundParser::queuedCount() returns the number of documents that are queued in BackgroundParser. The problem is that this method can return zero when there is no queued document in BackgroundParser, but some of them are still queued or running in ThreadWeaver::Weaver.

The method added by this patch returns true only when the document queue is completely empty and ThreadWeaver::Weaver is idle (no job queued, no job running). When this method returns true, the user can be assured that nothing can happen in a background thread.


  language/backgroundparser/backgroundparser.h d96d67b 
  language/backgroundparser/backgroundparser.cpp dec1be7 



This new method is used by the QML/JS plugin to wait for all the parsing jobs to be finished before trying to use and free DUContexts. The unit tests of the QMLJS plugin all pass with this patch applied. All the unit tests of KDevPlatform also pass with this patch applied.


Denis Steckelmacher

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the KDevelop-devel mailing list