From 7cdd522f511102de96eaca31c58b5d67912cf64c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 1 Aug 2012 14:49:39 +0200 Subject: [PATCH] Added: #1440 Mutex while initializing file status cache --HG-- branch : build_pipeline_v3 --- code/nel/tools/pipeline/service/module_pipeline_slave.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/pipeline/service/module_pipeline_slave.cpp b/code/nel/tools/pipeline/service/module_pipeline_slave.cpp index a54792c55..eeb66b2f1 100644 --- a/code/nel/tools/pipeline/service/module_pipeline_slave.cpp +++ b/code/nel/tools/pipeline/service/module_pipeline_slave.cpp @@ -107,6 +107,7 @@ public: bool m_AbortRequested; CProcessResult m_ResultPreviousSuccess; + CMutex m_FileStatusInitializeMutex; std::map m_FileStatusCache; CProcessResult m_ResultCurrent; @@ -488,8 +489,10 @@ public: nldebug("Add file status: '%s' (macro path)", macroPath.c_str()); std::string filePath = unMacroPath(macroPath); - nlassert(m_FileStatusCache.find(filePath) == m_FileStatusCache.end()); + m_FileStatusInitializeMutex.enter(); + nlassert(m_FileStatusCache.find(filePath) == m_FileStatusCache.end()); // for now don't allow depending on own output within process :) m_FileStatusCache[filePath] = fileStatus; + m_FileStatusInitializeMutex.leave(); } ///////////////////////////////////////////////////////////////////