diff --git a/src/support/include/Options.h b/src/support/include/Options.h index d96cdfc..7883637 100644 --- a/src/support/include/Options.h +++ b/src/support/include/Options.h @@ -18,7 +18,6 @@ public: template static T get(const std::string &opt) { Options &o = get(); - std::shared_lock l(o._mutex); if (_defaults.find(opt) == _defaults.end()) throw std::invalid_argument("Unknown option " + opt); if (!std::holds_alternative(_defaults.at(opt))) throw std::invalid_argument("Bad option type " + opt); return std::get(o._current.at(opt)); @@ -27,7 +26,6 @@ public: template static void set(const std::string &opt, const T &val) { Options &o = get(); - std::lock_guard l(o._mutex); if (_defaults.find(opt) == _defaults.end()) throw std::invalid_argument("Unknown option " + opt); if (!std::holds_alternative(_defaults.at(opt))) throw std::invalid_argument("Bad option type " + opt); o._current[opt] = val; @@ -44,7 +42,6 @@ private: {"repl", true}}; std::unordered_map> _current = _defaults; - std::shared_mutex _mutex; }; diff --git a/src/support/src/Options.cpp b/src/support/src/Options.cpp index 256b7ac..ff517f7 100644 --- a/src/support/src/Options.cpp +++ b/src/support/src/Options.cpp @@ -11,7 +11,4 @@ Options &Options::get() { return opts; } -void Options::reset() { - std::lock_guard l(get()._mutex); - get()._current = _defaults; -} +void Options::reset() { get()._current = _defaults; }