mirror of
https://github.com/pocoproject/poco.git
synced 2025-07-04 09:37:11 +02:00
Prevent possible data race in access to Timer::_periodicInerval
This commit is contained in:
parent
2fc0e524fa
commit
391deca195
@ -208,6 +208,7 @@ void Timer::run()
|
|||||||
{
|
{
|
||||||
Poco::ErrorHandler::handle();
|
Poco::ErrorHandler::handle();
|
||||||
}
|
}
|
||||||
|
Poco::FastMutex::ScopedLock lock(_mutex);
|
||||||
interval = _periodicInterval;
|
interval = _periodicInterval;
|
||||||
}
|
}
|
||||||
_nextInvocation += static_cast<Clock::ClockVal>(interval)*1000;
|
_nextInvocation += static_cast<Clock::ClockVal>(interval)*1000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user