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

Kevin Funk kfunk at kde.org
Mon Jun 9 09:27:24 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118617/#review59598
-----------------------------------------------------------

Ship it!


Ship It!

- Kevin Funk


On June 9, 2014, 9:03 a.m., Denis Steckelmacher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118617/
> -----------------------------------------------------------
> 
> (Updated June 9, 2014, 9:03 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   language/backgroundparser/backgroundparser.h d96d67b 
>   language/backgroundparser/backgroundparser.cpp dec1be7 
> 
> Diff: https://git.reviewboard.kde.org/r/118617/diff/
> 
> 
> Testing
> -------
> 
> 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.
> 
> 
> Thanks,
> 
> Denis Steckelmacher
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140609/27f70259/attachment.html>


More information about the KDevelop-devel mailing list