15#include <vsg/core/Inherit.h>
21 class ActivityStatus :
public Inherit<Object, ActivityStatus>
24 explicit ActivityStatus(
bool active =
true) :
27 void set(
bool flag)
noexcept { _active.exchange(flag); }
30 bool active() const noexcept {
return _active; }
33 bool cancel() const noexcept {
return !_active; }
38 std::atomic_bool _active;
40 VSG_type_name(vsg::ActivityStatus)
ActivityStatus provides atomic management of whether threads watching this ActivityStatus object shou...
Definition ActivityStatus.h:22
bool active() const noexcept
return true if the caller should continue with current activity or false if they should be canceled
Definition ActivityStatus.h:30
bool cancel() const noexcept
return true if the caller should cancel current activity
Definition ActivityStatus.h:33