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

Denis Steckelmacher steckdenis at
Sun Jun 8 13:35:13 UTC 2014

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

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. The testsuite of kdevplatform has no regression, but seven tests fail with or without this patch:

The following tests FAILED:
         25 - shell-documentcontrollertest (Failed)
         26 - shell-uicontrollertest (Failed)
         27 - shell-buddytest (Failed)
         28 - shell-documentoperationtest (Failed)
         38 - modelsTest (Failed)
         39 - reloadtest (Failed)
         40 - standardoutputview-test (Failed)

They crash in the initialization code. I think that it is a problem in my setup or something like that, because they all pass on


Denis Steckelmacher

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

More information about the KDevelop-devel mailing list