[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Text layouting & multithreading
From:       Thomas Zander <zander () kde ! org>
Date:       2006-09-20 12:56:31
Message-ID: 200609201456.31952.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 20 September 2006 14:22, Stefan Nikolaus(UNTRUSTED, sender is 
<koffice-devel-bounces-+kde.org-zander=kde.org@kde.org>) wrote:
> > The usage of that action is to make it stupidly easy to use multiple
> > threads.
>
> So, I can replace all KActions by KoActions?!

While this is theoretically possible most C++ code won't respond well to being 
executed in another thread. I think nobody thought about coding thread-safe 
in KOffice before.

The KoAction comes from a UICAction which I wrote in Java years ago. In that 
instance all the 'normal' actions were indeed replaced with it and that 
worked fine. (more then fine, actually ;) Which is why I say its 
theoretically possible.

The KoAction actually has some features for this usage already. It has two 
signals you can connect to. One is the multithreaded one and the other is 
the 'updateUi' signal that you can connect another method to that will be 
guaranteed to be called in the GUI thread directly after the multithreaded 
code is executed and thus allows you to update the content of widgets etc 
(something you are only allowed to do in the GUI thread) quite easily.

So, I won't give a full 'yes' to your question. The usage not as simple as it 
can be and naturally things like what the KGuiItem holds are missing.

But, please feel free to experiment!
-- 
Thomas Zander

[Attachment #5 (application/pgp-signature)]

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic