summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AnvilStats/Processor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/AnvilStats/Processor.cpp b/AnvilStats/Processor.cpp
index 0d7c5d192..2f6f2d860 100644
--- a/AnvilStats/Processor.cpp
+++ b/AnvilStats/Processor.cpp
@@ -489,6 +489,12 @@ void cProcessor::ProcessWorld(const AString & a_WorldFolder, cCallbackFactory &
{
PopulateFileQueue(a_WorldFolder);
+ if (m_FileQueue.empty())
+ {
+ LOG("No files to process, exitting.");
+ return;
+ }
+
// Start as many threads as there are cores, plus one:
// (One more thread can be in the file-read IO block while all other threads crunch the numbers)
int NumThreads = GetNumCores() + 1;
@@ -503,10 +509,12 @@ void cProcessor::ProcessWorld(const AString & a_WorldFolder, cCallbackFactory &
// Wait for all threads to finish
// simply by calling each thread's destructor sequentially
+ LOG("Waiting for threads to finish");
for (cThreads::iterator itr = m_Threads.begin(), end = m_Threads.end(); itr != end; ++itr)
{
delete *itr;
} // for itr - m_Threads[]
+ LOG("Processor finished");
}