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

List:       kde-panel-devel
Subject:    Re: [Panel-devel] Multithreaded krunner
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2007-11-18 1:48:50
Message-ID: 200711171848.53871.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Saturday 17 November 2007, Ryan Bitanga wrote:
> Here's the patch against the last time I svn up'd (r737082). Sorry for
> the delay, school kinda got in the way. And if I had only paid a
> little more attention to the threadweaver API, I could have avoided
> several unproductive days pinpointing the exact reasons for crashes
> and could've released this a week ago.

;)

> Interface:
> - Use threadweaver classes
> - Add a delay before updating matches so just in case multiple runners
> return results, the list only has to be updated once

that's nice =)

> Notes for writing future runners:
> - Use Plasma::SearchAction instead of QAction

and SearchAction is there because QAction is GUI and therefore not thread 
safe, correct?

> - Don't create QObjects that are children of objects from different
> threads (such as the runner)
> - Follow the others reminders in the Qt4 documentation about
> multithreading.
>
> Changes I snuck in:
> - change canBeConfigured() to isConfigurable() for the sake of API
> consistency

looks good. this part should be committed regardless.

> - add a whitelist to loadRunners() so users can selectively 
> load runner plug-ins in the future

please commit this part; thought this:


if( whitelist.empty() || !whitelist.empty() && whitelist.contains( 
service->name() ) )

could just be:

if (whitelist.isEmpty() || whitelist.contains(service->name()))

> Possible problems:
> - KRunner may not be responsive if the query is changed while the
> match method of a slow runner is being executed by threadweaver.
>   This is because ThreadWeaver doesn't abort jobs that are currently
> being run and aborting jobs requires the implementers of runners to
> have knowledge about ThreadWeaver jobs.

hm... how much and what kind of knowledge? because this probably isn't worth 
doing unless we can make the UI completely fluid.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech

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

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


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

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