Skip to content
Snippets Groups Projects
Commit d1bb1849 authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

Avoid float comparisons in BaseSink

parent 3c71e971
No related branches found
No related tags found
1 merge request!1490Fixed unsafe floating point comparisons
......@@ -74,7 +74,7 @@ namespace Gaudi::Monitoring {
// promise needs to be recreated in case of a restart
m_flushThreadStop = std::promise<void>{};
// enable periodic output file flush if requested
if ( m_autoFlushPeriod.value() != 0 ) {
if ( m_autoFlushPeriod.value() > std::numeric_limits<double>::epsilon() ) {
m_flushThread = std::thread{ [this, flushStop = m_flushThreadStop.get_future()]() {
using namespace std::chrono_literals;
while ( flushStop.wait_for( m_autoFlushPeriod.value() * 1s ) == std::future_status::timeout ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment