summaryrefslogtreecommitdiff
path: root/include/configreader.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/configreader.h')
-rw-r--r--include/configreader.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/configreader.h b/include/configreader.h
index 4b42bcd43..4b425e03b 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -598,4 +598,29 @@ class CoreExport ServerConfig
};
+/** The background thread for config reading, so that reading from executable includes
+ * does not block.
+ */
+class CoreExport ConfigReaderThread : public Thread
+{
+ ServerConfig* Config;
+ volatile bool done;
+ public:
+ const std::string TheUserUID;
+ ConfigReaderThread(const std::string &useruid)
+ : Config(new ServerConfig), done(false), TheUserUID(useruid)
+ {
+ }
+
+ virtual ~ConfigReaderThread()
+ {
+ delete Config;
+ }
+
+ void Run();
+ /** Run in the main thread to apply the configuration */
+ void Finish();
+ bool IsDone() { return done; }
+};
+
#endif