Multithreading issues with C++ support?
Andreas Pakulat
apaku at gmx.de
Wed Jan 21 23:00:44 UTC 2009
On 21.01.09 23:45:36, David Nolden wrote:
> Yep exactly these issues make multi-threaded parsing crash on real multi-core
> machines.
>
> We need to somehow get the languagesForUrl(..) function thread-safe, that's
> the core problem.
>
> A simple and fast workaround would be caching the list returned by
> languagesForUrl by the file-extension, but it would only make the crash much
> less probably, not completely impossible.
>
> The problem is, if kdelibs 4.2 is not threadsafe in this regard, then we will
> have to work around it, since we want to run on that version.
We _probably_ want to run on that version, its not written in stone.
Apart from that we don't necessarily need to be able to run with 4.2.0
if it has such big threading issues. If we can fix the issues in trunk/
and backport them to 4.2 branch its perfectly fine to depend on 4.2.1
(or .2, .3, whatever the release is).
As you can probably guess, I'd rather have a fixed kdelibs then us
working around it or making it "less probable". Multi-Core machines are
quite "normal" these days (this one happened on a dual-core laptop).
The real problem is getting it fixed in kdelibs, AFAIK the persons to
talk to about these things are David Faure and possibly Ossi
Buddenhagen. Those two should know the code best, but both are usually
heavily loaded and hence we might need to do the debugging +
fix-proposal ourselves.
Unless you want to dive head-first into it (IIRC you've started your
diploma work already) I'll check what languagesForUrl does, i.e. what
classes it touches and try to work out with David where to start with
this (answer will probably be: write a unit-test ;)
Andreas
--
If you learn one useless thing every day, in a single year you'll learn
365 useless things.
More information about the KDevelop-devel
mailing list