cid#1662039 Data race condition
Change-Id: I58ed464b9f49ddf12f21995f08a8a70f430e2669 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189930 Reviewed-by: Michael Stahl <michael.stahl@collabora.com> Tested-by: Jenkins
This commit is contained in:
committed by
Michael Stahl
parent
657f0112b5
commit
7aab3f08de
@@ -70,13 +70,14 @@ void TickerThread::execute()
|
||||
if (sleep_duration == std::chrono::milliseconds::max())
|
||||
{
|
||||
// Wait until a lock is added or shutdown
|
||||
m_rLockStore.m_aCondition.wait(
|
||||
aGuard, [this] { return !m_rLockStore.m_aLockInfoMap.empty() || m_bFinish; });
|
||||
m_rLockStore.m_aCondition.wait(aGuard,
|
||||
[this] { return !m_rLockStore.m_aLockInfoMap.empty() || m_bFinish; });
|
||||
}
|
||||
else
|
||||
{
|
||||
// Wait until the next deadline or a notification
|
||||
m_rLockStore.m_aCondition.wait_for(aGuard, sleep_duration);
|
||||
m_rLockStore.m_aCondition.wait_for(aGuard, sleep_duration,
|
||||
[this] { return !m_rLockStore.m_aLockInfoMap.empty() || m_bFinish; });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user