From 6fe52cbb3ba72a5ecdded3f51c8515bf75e6801f Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 25 Oct 2009 15:21:45 +0000 Subject: Fixes found by removing User inheritance from StreamSocket git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11975 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/configreader.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'include/configreader.h') 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 -- cgit v1.2.3