diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-24 19:08:26 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-24 19:08:26 +0000 |
commit | e83461d2e2e359d5ebbd7d6e553bb994a8e6524d (patch) | |
tree | 3e9ec2ef764a2898ad16e32c50607a166d033aa2 | |
parent | 1deb30602a6b68b857f64763351fac63032c22ff (diff) |
Add some important comments
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9029 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/inspircd.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index de725d0e1..47c47dbeb 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -636,11 +636,25 @@ int InspIRCd::Run() static char window_title[100]; #endif + /* Check if there is a config thread which has finished executing but has not yet been freed */ if (this->ConfigThread && this->ConfigThread->GetExitFlag()) { /* Rehash has completed */ this->Logs->Log("CONFIG",DEBUG,"Detected ConfigThread exiting, tidying up..."); + + /* IMPORTANT: This delete may hang if you fuck up your thread syncronization. + * It will hang waiting for the ConfigThread to 'join' to avoid race conditons, + * until the other thread is completed. + */ delete ConfigThread; + + /* These are currently not known to be threadsafe, so they are executed outside + * of the thread. It would be pretty simple to move them to the thread Run method + * once they are known threadsafe with all the correct mutexes in place. + * + * XXX: The order of these is IMPORTANT, do not reorder them without testing + * thoroughly!!! + */ this->XLines->CheckELines(); this->XLines->ApplyLines(); this->Res->Rehash(); |