KatePart + KDE 4.4 + QMutex & Co.
Christoph Cullmann
cullmann at absint.com
Sun Jul 19 18:00:12 UTC 2009
On Thursday 16 July 2009 02:57:04 Hamish Rodda wrote:
> On Sat, 11 Jul 2009 12:56:39 am Christoph Cullmann wrote:
> > Hi,
> >
> > I just read again through the bugreports and the kate part code. It seems
> > to me really over complex to have all this locking build into the part.
> > Given a quick look at qtcreator, which parses the sources, too, they can
> > do all the locking if at all outside of the qtextdocument/edit they use.
> >
> > Could you try to do so, too, by just locking the main thread on the rare
> > occasions you change stuff on the part or handle the mutex locking in the
> > kdevelop application?
>
> We have separate locks within kdevelop for kdevelop-related code, but to
> interact with the KTE interfaces from the non-main thread, locking is
> required.
>
> > I think still, there a lots of hidden deadlocks and errors in katepart's
> > locking and no app beside kdevelop needs this.
>
> I'm not sure if that's true, but if so, only kdevelop will encounter these
> deadlocks then, because katepart's use of locks within a single thread only
> will not cause any bug (ie. if you don't use the smart lock from another
> thread, it's not possible to cause a deadlock).
>
> > It would be really cool, if it could be removed in the KDE 4.4 timeframe.
>
> What is the alternative?
The question is: Wouldn't it be enough to lock the main-thread an access kate
part's API or would that be to slow? That way, there would be no locking
inside kate part be required at all.
Given that QtCreator seems to do some parsing, too, and needs not thread-safe
QTextDocument/View, it should work out.
Greetings
Christoph
--
-------------------------------------- Christoph Cullmann ---------
AbsInt Angewandte Informatik GmbH Email: cullmann at AbsInt.com
Science Park 1 Tel: +49-681-38360-22
66123 Saarbrücken Fax: +49-681-38360-20
GERMANY WWW: http://www.AbsInt.com
--------------------------------------------------------------------
Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234
_______________________________________________
More information about the KDevelop-devel
mailing list