Remove an unsafe assert in the log backend that could be triggered under very certain circumstances.

RFCI has detected this assert failing in the log_backend_test. I have not been able to reproduce this locally but my theory is the following one:
one of the unit tests does the following:

backend.start();
backend.stop();

the internal running_flag member could be set to true and then to false by the main thread before the worker thread calls do_work(). If this happens
the assert will be triggered, which is wrong and too conservative, so remove the assert.
master
faluco 3 years ago committed by faluco
parent 6f5614a0cc
commit e20934583e

@ -85,8 +85,6 @@ void backend_worker::start(backend_priority priority)
void backend_worker::do_work()
{
assert(running_flag && "Thread entry function called without running thread");
/// This period defines the time the worker will sleep while waiting for new entries. This is required to check the
/// termination variable periodically.
constexpr std::chrono::microseconds sleep_period{100};

Loading…
Cancel
Save