kdreview: dictionary runner; changes needed to Plasma::RunnerManager?

Aaron J. Seigo aseigo at kde.org
Tue Aug 24 22:59:23 CEST 2010


hi ...

looking at the dictionary runner, i've noticed a few things that should be 
improved:

* when the teardown() signal is emitted, the runner should disconnect from the 
DataEngine

but i've also come to a few concerning conclusions:

* a thread can wait indefinitely on m_wait.wait(&m_mutex);

* if the user types more than $THREAD_POOL_COUNT letters before the dict 
engine returns, the thread pool will be filled with dictionary runner threads 
and therefore be exhausted

looking at it further, it's evident that this runner is really working around 
the fact that it is multithreaded; it would be far easier in this case to 
simply make match() re-entrant and have just one thread of it around.

for such runners, i think it would make sense to allow for them to mark 
themselves as re-entrant and then give them their own thread outside the 
shared threadpool.

the nice thing about the current design is that match() methods do not need to 
be made re-entrant, and this makes it simpler for many of the runners. but it 
assumes that the runners exit quickly (freeing up the thread pool) and don't 
rely on any resources that have a single-thread restriction on them (as is the 
case with the dictionary plasmoid, among one or two others).

thoughts?

once we sort this part out, the i'd like to see the dictonary runner moved to 
kdeplasma-addons/runners/

-- 
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 Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100824/a6194100/attachment.sig 


More information about the Plasma-devel mailing list