Thread-safety issue in cmake support ?

Milian Wolff mail at milianw.de
Mon Jun 7 15:20:18 UTC 2010


Sandro Andrade, 07.06.2010:
> Hi there,
> 
> I sent this issue some time ago regarding multiple access to KConfig
> and I've been told to ask kde-core-devel guys
> about KConfig thread safety. However, KConfig is neither thread-safe
> nor even reentrant:
> 
> http://lists.zerezo.com/kde-devel/msg12619.html
> http://lists.kde.org/?l=kde-devel&m=118037451920733&w=2
> 
> So I should take care of this. The problem raises from calling
> "buildSystemManager->includeDirectories(project_item)" from multiples
> threads. I need to obtain project's include directories but probably
> the concurrent execution of background parser is causing such a crash
> (see following backtrace).

Either put a mutex into your plugin or directly into cmake - dunno. You should 
investigate where the function is currently used (isn't that used somewhere in 
the background parser? meaning from multiple threads?)

If so, we'd need to put it into the CMake plugin directly.

anyhow: it's interesting to know that this is not threadsafe, afaik there are 
a few places in KDevelop assuming that it _is_ threadsafe ;-) Oh boy, the joy 
of multithreading :]
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100607/23ab58a2/attachment.sig>


More information about the KDevelop-devel mailing list