diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-04 15:34:25 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-04 15:34:25 +0200 |
commit | 88a97874b863a7ab0ec5756547d55f183c2c109c (patch) | |
tree | b03f09adf4f64b5df17770829db295051ae958b5 | |
parent | More 64-bit fixes (diff) | |
download | cuberite-88a97874b863a7ab0ec5756547d55f183c2c109c.tar cuberite-88a97874b863a7ab0ec5756547d55f183c2c109c.tar.gz cuberite-88a97874b863a7ab0ec5756547d55f183c2c109c.tar.bz2 cuberite-88a97874b863a7ab0ec5756547d55f183c2c109c.tar.lz cuberite-88a97874b863a7ab0ec5756547d55f183c2c109c.tar.xz cuberite-88a97874b863a7ab0ec5756547d55f183c2c109c.tar.zst cuberite-88a97874b863a7ab0ec5756547d55f183c2c109c.zip |
-rw-r--r-- | AnvilStats/Processor.cpp | 8 |
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");
}
|