From 104ae7454c6f47e7072aa35286534450b921e177 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sun, 31 Oct 2010 00:22:35 +0200 Subject: [PATCH] Make setting getters/setters atomic. --- src/setting.cc | 1 + src/setting.hh | 1 + 2 files changed, 2 insertions(+) diff --git a/src/setting.cc b/src/setting.cc index 70fcbad7..fc9f1149 100644 --- a/src/setting.cc +++ b/src/setting.cc @@ -107,6 +107,7 @@ namespace conky { void config_setting_base::lua_set(lua::state &l) { + std::lock_guard guard(l); lua::stack_sentry s(l, -1); l.checkstack(2); diff --git a/src/setting.hh b/src/setting.hh index b7fd4365..e7b20642 100644 --- a/src/setting.hh +++ b/src/setting.hh @@ -209,6 +209,7 @@ namespace conky { template T config_setting_template::get(lua::state &l) { + std::lock_guard guard(l); lua::stack_sentry s(l); l.checkstack(2);