<p>That is ugly (IMO) and complicated though, because you need a lot of changes to the codebase, and whenever you want to use something from within the background thread you have to thing hard how to get it there. It's much simpler to simply introduce a big lock through which you can access anything, and then make sure it's used seldomly enough and only for short intervals to make sure there is a minimum amount of lock contention.</p>

<p>It wouldn't even be desirable to eliminate all instances of the lock, as the lock would achieve the same as a message-passing interface between the foreground and background which would be the alternative, just with much less code.</p>

<p> I'm pretty sure that only very few instances of the big lock would cause performance issues. We can identify those instances and think out something better there, but for most usecases the foreground lock should work perfectly, because (at least in c++ support), access to foreground data is only needed in few cases.</p>

<p>Greetings, David</p>
<p><blockquote type="cite">Am 09.06.2010 13:09 schrieb "Esben Mose Hansen" <<a href="mailto:kde@mosehansen.dk">kde@mosehansen.dk</a>>:<br><br><p><font color="#500050">On Wednesday 09 June 2010 08:23:53 Christoph Cullmann wrote:<br>
> You must first pack all stuff needed ...</font></p><p><font color="#500050">> For the kate part case that means, getting text and revision number, doing<br>> all parsing on the co...</font></p>Thank you for doing my todo-list for me :) This is exactly what we need to<br>

migrate towards. That is, we need a rule that once a thread is spawned, it is<br>
only allowed to access its own data. Yes, it will be a long time before that<br>
is totally true, but every time a thread job does this KDevelop will be a<br>
little more stable.<br>
<br>
Surely, working towards this is not impossible?<br>
<font color="#888888"><br>
--<br>
kind regards, Esben<br>
</font><p><font color="#500050"><br>-- <br>KDevelop-devel mailing list<br><a href="mailto:KDevelop-devel@kdevelop.org">KDevelop-devel@kdevelop.org</a><br><a href="https://barney.cs.uni-potsdam.de/mailma.">https://barney.cs.uni-potsdam.de/mailma.</a>..</font></p>
</blockquote></p>