From kde-panel-devel Wed Mar 24 15:27:04 2010 From: "Aaron J. Seigo" Date: Wed, 24 Mar 2010 15:27:04 +0000 To: kde-panel-devel Subject: Re: Running queries via dbus Message-Id: <201003240827.05720.aseigo () kde ! org> X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=126944448208066 On March 23, 2010, Alex Merry wrote: > On Tuesday 23 March 2010 23:47:10 Jacopo De Simoi wrote: > > I just got a quite crazy idea; it might work though. > > Since we are making the thread stall by waiting for the async reply we > > could as well check that while we get the pending reply the context is > > still valid and bail out discarding the reply otherwise. If this can be > > coded in a simple way I guess it's a good solution for preventing > > stacking up of threads in krunner Aaron ,what do you think about this? i think that for runners like this, RunnerManager should not be launching more than one query run at a time for them. something we aimed for waaay back in (iirc) 4.1 was to have a "slow runners thread" which would be used as a slow lane for these kinds of runners. the result is that they'd block each other, but there'd always be at least 1-2 threads free for the not-slow-pokes. if it is indeed possible for one slow runner to end up taking all N threads in an N-thread sized pool then we've regressed on that and that is what should be addressed. while it will always be possible for all the threads to be consumed with slow runners in the right situations, we can at least try to avoid it by not letting runners we know to be slow to have access to all the threads in the pool. > Well, we can use signals and slots to get the reply - would that help? Is > there any way of getting a signal when the context is invalidated, or do > you just have to check? you just have to check. -- 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 _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel