Code completion locking

David Nolden david.nolden.kdevelop at art-master.de
Fri Sep 2 09:48:28 UTC 2011


2011/8/17 Olivier JG <olivier.jg at gmail.com>:
> I've refactored the CPP code completion context a bit as well as
> reorganized the locking it does. This should fix the occasional deadlock
> during "case |" completion.
> However, I also made a change to kdevplatform so that the duchain is no
> longer locked when calling "completionItems()", since that makes it
> impossible to later acquire the foregroundlock. If any other languages
> (PHP, Python) rely on that, they'll need to acquire the lock themselves.
> Let me know if this is a problem for any reason, or if I screwed
> something up.
>
> Please everyone also get a backtrace if you deadlock during code
> completion, as it's probably my fault (even though I thought I thought
> it through pretty well). I'll fix it quickly.

Generally, it would be nice if you could add your assumptions about
the locking to all the code-completion API function comments that are
affected, so that code-completion plugin developers know how to
proceed.




More information about the KDevelop-devel mailing list