diff options
author | Mattes D <github@xoft.cz> | 2014-08-27 11:32:51 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-08-27 11:32:51 +0200 |
commit | 3da27fb7a3f45bc5a82bba13e9b836c8b3dca6a5 (patch) | |
tree | f5ababf68358785f38268f7b21442b0f7c13790b /Tools/AnvilStats/Processor.h | |
parent | AnvilStats: Rewritten to use CMake. (diff) | |
parent | AnvilStats: Fixed thread start race condition. (diff) | |
download | cuberite-3da27fb7a3f45bc5a82bba13e9b836c8b3dca6a5.tar cuberite-3da27fb7a3f45bc5a82bba13e9b836c8b3dca6a5.tar.gz cuberite-3da27fb7a3f45bc5a82bba13e9b836c8b3dca6a5.tar.bz2 cuberite-3da27fb7a3f45bc5a82bba13e9b836c8b3dca6a5.tar.lz cuberite-3da27fb7a3f45bc5a82bba13e9b836c8b3dca6a5.tar.xz cuberite-3da27fb7a3f45bc5a82bba13e9b836c8b3dca6a5.tar.zst cuberite-3da27fb7a3f45bc5a82bba13e9b836c8b3dca6a5.zip |
Diffstat (limited to 'Tools/AnvilStats/Processor.h')
-rw-r--r-- | Tools/AnvilStats/Processor.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Tools/AnvilStats/Processor.h b/Tools/AnvilStats/Processor.h index 72fea3081..db50ec619 100644 --- a/Tools/AnvilStats/Processor.h +++ b/Tools/AnvilStats/Processor.h @@ -30,6 +30,7 @@ class cProcessor cCallback & m_Callback; cProcessor & m_ParentProcessor; + cEvent m_HasStarted; // cIsThread override: virtual void Execute(void) override; @@ -48,6 +49,9 @@ class cProcessor public: cThread(cCallback & a_Callback, cProcessor & a_ParentProcessor); + + /** Waits until the thread starts processing the callback code. */ + void WaitForStart(void); } ; typedef std::vector<cThread *> cThreads; @@ -65,10 +69,12 @@ protected: AStringList m_FileQueue; cThreads m_Threads; - cEvent m_ThreadsHaveStarted; // This is signalled by each thread to notify the parent thread that it can start waiting for those threads - + + + /** Populates m_FileQueue with Anvil files from the specified folder. */ void PopulateFileQueue(const AString & a_WorldFolder); + /** Returns one filename from m_FileQueue, and removes the name from the queue. */ AString GetOneFileName(void); } ; |