5namespace CppClingo::Util {
25 void request_stop() noexcept { state_.store(
true, std::memory_order_relaxed); }
27 [[nodiscard]]
auto stop_requested() noexcept ->
bool {
return state_.load(std::memory_order_relaxed); }
30 std::atomic<bool> state_ =
false;
Helper class to signal stopping of grounding.
Definition sync.hh:11
auto stop_requested() noexcept -> bool
Test whether stopping has been requested.
Definition sync.hh:27
StopFlag() noexcept=default
Construct a false stop flag.
void request_stop() noexcept
Set the stop flag.
Definition sync.hh:25