1#ifndef BKCRACK_PROGRESS_HPP
2#define BKCRACK_PROGRESS_HPP
28 const auto lock = std::scoped_lock{m_os_mutex};
37 std::mutex m_os_mutex;
std::atomic< int > done
Number of steps already done.
Definition Progress.hpp:33
std::atomic< State > state
State of the long operation.
Definition Progress.hpp:32
void log(F f)
Definition Progress.hpp:26
std::atomic< int > total
Total number of steps.
Definition Progress.hpp:34
State
Possible states of a long operation.
Definition Progress.hpp:14
@ Canceled
The operation has been canceled externally.
Definition Progress.hpp:16
@ EarlyExit
The operation stopped after a partial result was found.
Definition Progress.hpp:17
@ Normal
The operation is ongoing or is fully completed.
Definition Progress.hpp:15
Progress(std::ostream &os)
Constructor.