[Kde-hardware-devel] PowerManager Library

Lamarque V. Souza lamarque at kde.org
Wed Jun 20 23:50:57 UTC 2012


Em Wednesday 20 June 2012, Daniel Nicoletti escreveu:
> 2012/6/20 Lamarque V. Souza <lamarque at kde.org>:
> > "Heavy work" is just a manner of speaking :-) It's too bad that each
> > module should implement such a thread way of doing things. We could add
> > something reusable like kded implementing each module as a thread. It
> > should work (famous last words).
> 
> I thought of that but it won't work, first because
> we don't know which module is thread-safe, secondly
> because there are a few modules which need to be in
> the main thread (such as colord-kde and krandr because
> they need to listen to X events). In the colord-kde case
> I moved just the "heavy work" (reading files) to a thread.
> My plan is to help each KDED developer to port their modules
> to use threads (which is very easy), but I didn't had time
> yet to start, KMix and NetworkManager which are the
> most verbose ones on the terminal would surely come
> first, but I need the maintainers willing to do the change...

	Networkmanagement's kded module uses KDialog to get the PIN/PUK codes to 
unlock Gsm modems, which means it also need to be in the main thread, at least 
that part have to be. Most of the kded initialization is done after the 
plasmoid is loaded (there is a signal for that), although I did not implement 
that for loading the module faster it also helps in this regard. My main 
concern is if something tries to access the module before it is fully up and 
running, hmmm if registering it to the bus is the last step that should do the 
trick (famous last words, part 2 :-)).

-- 
Lamarque V. Souza
KDE's Network Management maintainer
http://planetkde.org/pt-br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20120620/3b236057/attachment.html>


More information about the Kde-hardware-devel mailing list