Thread-safety issue in cmake support ?

Christoph Cullmann cullmann at
Sat Jun 12 05:25:20 UTC 2010

On Friday 11 June 2010 22:13:35 Milian Wolff wrote:
> Esben Mose Hansen, 11.06.2010:
> > On Friday 11 June 2010 21:41:56 Milian Wolff wrote:
> > > This I don't get. Each SmartRange or well, in future, each MovingRange
> > > must be  accessed in the MainThread since the document might get edited
> > > while getting parsed.
> > 
> > This seems like a suboptimal approach. While not simply store the ranges
> > as simple structures and instantiate the smart/moving things when the
> > document gets activated? For the currently edited document, I'd parse a
> > copy, and discard the result if the file was changed during parsing. If
> > we wanted to get smart about it, we could allow the parsing to be
> > restarted from a point (the point that was edited).
> > 
> > That neatly eliminates a whole slew of foregound locks once-and-for-all.
> > That leaves the duchain, and the include path resolution and maybe a few
> > other things.
> Yes, just my and Christophs point.
Yep ;)

Btw., you even not need to restart, you can create simple ranges, like 
kdevelop's SimpleRange and later just use translate for them to translate them 
to the right positions, for that, you only need to remember the integer 
revision for which you got the text before the thread started, after parsing 
is done, create movingranges in mainthread, translate them, be done.


-------------------------------------- Christoph Cullmann ---------
AbsInt Angewandte Informatik GmbH      Email: cullmann at
Science Park 1                         Tel:   +49-681-38360-22
66123 Saarbrücken                      Fax:   +49-681-38360-20
GERMANY                                WWW:
Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234

More information about the KDevelop-devel mailing list