18 std::lock_guard<std::mutex>
const lock{
mutex_};
31 std::unique_lock<std::mutex> lck(
mutex_);
42 std::lock_guard<std::mutex> lock{
mutex_};
Class type to contains a value (of type ValueType), or an error (of type ErrorType)
virtual void Initialize() noexcept=0
Function to initialize the DiagnosticManager.
virtual void Main() noexcept
Function to manage the whole lifecycle of DiagnosticManager.
virtual void Run() noexcept=0
Function to run DiagnosticManager.
virtual void Shutdown() noexcept=0
Function to shutdown the DiagnosticManager.
DiagnosticManager() noexcept
Constructs an instance of DiagnosticManager.
bool exit_requested_
Flag to terminate the main thread.
std::condition_variable cond_var_
Conditional variable to block the thread.
std::mutex mutex_
For locking critical section of code.
virtual ~DiagnosticManager() noexcept
Destructs an instance of DiagnosticManager.
virtual Result< void > SignalShutdown() noexcept
Function to initiate shutdown of DiagnosticManager.