summaryrefslogtreecommitdiff
path: root/include/configreader.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-25 15:21:45 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-25 15:21:45 +0000
commit6fe52cbb3ba72a5ecdded3f51c8515bf75e6801f (patch)
tree19b755377e2d830c78346930b8df27bca7d522f6 /include/configreader.h
parent5d73e8928826340aaca9e78205ffb093a6b4f95c (diff)
Fixes found by removing User inheritance from StreamSocket
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11975 e03df62e-2008-0410-955e-edbf42e46eb7
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