summaryrefslogtreecommitdiffhomepage
path: root/options/scoped.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'options/scoped.hpp')
-rw-r--r--options/scoped.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/options/scoped.hpp b/options/scoped.hpp
index 52ae383d..4ad51fea 100644
--- a/options/scoped.hpp
+++ b/options/scoped.hpp
@@ -5,6 +5,8 @@
#include "export.hpp"
+#include <atomic>
+
namespace options {
struct OPENTRACK_OPTIONS_EXPORT opts
@@ -14,6 +16,13 @@ struct OPENTRACK_OPTIONS_EXPORT opts
opts& operator=(const opts&) = delete;
opts(const opts&) = delete;
~opts();
+
+ // XXX hack: the flag shouldn't be here as action at distance -sh 20160926
+ static void set_teardown_flag(bool value);
+private:
+ static std::atomic_bool teardown_flag;
+ static bool is_tracker_teardown();
+ static void ensure_thread();
};
}