diff --git a/src/plasma/private/runnerjobs_p.h b/src/plasma/private/runnerjobs_p.h index dfc2acaac..830d9a020 100644 --- a/src/plasma/private/runnerjobs_p.h +++ b/src/plasma/private/runnerjobs_p.h @@ -86,24 +86,6 @@ private: QMutex m_mutex; }; -/* ThreadWeaver work around: - * There is no method exposed that allows us to inform - * ThreadWeaver that a previously unavailable job is now - * available; thus, we use an empty job to wake up the threads - */ -class DummyJob : public ThreadWeaver::Job -{ - public: - DummyJob(QObject *parent) : Job(), m_decorator(new ThreadWeaver::QObjectDecorator(this, parent)) {} - ~DummyJob() {} - - ThreadWeaver::QObjectDecorator* decorator() const { return m_decorator; } - - private: - virtual void run(ThreadWeaver::JobPointer, ThreadWeaver::Thread*) {} - ThreadWeaver::QObjectDecorator* m_decorator; -}; - /* * FindMatchesJob class * Class to run queries in different threads diff --git a/src/plasma/runnermanager.cpp b/src/plasma/runnermanager.cpp index ee4851f29..cd76a57f6 100644 --- a/src/plasma/runnermanager.cpp +++ b/src/plasma/runnermanager.cpp @@ -384,15 +384,13 @@ public: void unblockJobs() { - // WORKAROUND: Queue an empty job to force ThreadWeaver to awaken threads if (searchJobs.isEmpty() && Weaver::instance()->isIdle()) { oldSearchJobs.clear(); checkTearDown(); return; } - DummyJob *dummy = new DummyJob(q); - Weaver::instance()->enqueueRaw(dummy); + Weaver::instance()->reschedule(); } void runnerMatchingSuspended(bool suspended)