diff --git a/runners/windows/windowsrunner.cpp b/runners/windows/windowsrunner.cpp --- a/runners/windows/windowsrunner.cpp +++ b/runners/windows/windowsrunner.cpp @@ -70,7 +70,6 @@ // Called in the main thread void WindowsRunner::gatherInfo() { - QMutexLocker locker(&m_mutex); if (!m_inSession) { return; } @@ -102,12 +101,16 @@ } m_ready = true; + + // unlock lock locked in prepareForMatchSession + m_mutex.unlock(); } // Called in the main thread void WindowsRunner::prepareForMatchSession() { - QMutexLocker locker(&m_mutex); + // gatherInfo will unlock the lock + m_mutex.lock(); m_inSession = true; m_ready = false; QTimer::singleShot(0, this, &WindowsRunner::gatherInfo); @@ -127,6 +130,7 @@ // Called in the secondary thread void WindowsRunner::match(Plasma::RunnerContext& context) { + // will run block as long as gatherInfo as not finished QMutexLocker locker(&m_mutex); if (!m_ready) { return;