diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-04-27 22:23:03 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-04-29 17:24:14 +0200 |
commit | 065f603379efe669d6ab496e6b8659de88949487 (patch) | |
tree | 47a7c86e841aafe1565c034559823186c241f7f1 /vcl/headless | |
parent | 0c500d3b8caa9b58f05c0ceb4d236f5878a06f6b (diff) |
unipoll: do the legacy wakeup if not in unipoll mode.
Change-Id: I7f5663f3316eb2bafcf13d07e2af69ae6f0637f5
Reviewed-on: https://gerrit.libreoffice.org/71445
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Jenkins
Diffstat (limited to 'vcl/headless')
-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; } |