diff options
-rw-r--r-- | vcl/headless/svpinst.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index a9c3488114fc..275ffc092735 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -374,8 +374,22 @@ sal_uInt32 SvpSalYieldMutex::doRelease(bool const bUnlockAll) // read m_nCount before doRelease bool const isReleased(bUnlockAll || m_nCount == 1); nCount = comphelper::SolarMutex::doRelease( bUnlockAll ); - if (isReleased && pInst) - pInst->Wakeup(SvpRequest::NONE); + + if (isReleased) + { + ImplSVData* pSVData = ImplGetSVData(); + if (pSVData->mpPollCallback) // is unipoll + { + if (pInst) + pInst->Wakeup(SvpRequest::NONE); + } + else + { + std::unique_lock<std::mutex> g(m_WakeUpMainMutex); + m_wakeUpMain = true; + m_WakeUpMainCond.notify_one(); + } + } } return nCount; } |