My Project
|
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 #pragma once 00029 #include "Define.h" 00030 #include "SmartThreadPool.h" 00031 #include "AutoLock.h" 00032 #include "CritSection.h" 00033 #include "SmartThreadPollManagerThread.h" 00034 00035 namespace SallyAPI 00036 { 00037 namespace System 00038 { 00047 00048 class DLL_API_SALLY CSmartThreadPoolManager 00049 { 00050 private: 00051 static SallyAPI::System::CSmartThreadPoolManager* m_pObject; 00052 00053 SallyAPI::System::CSmartThreadPollManagerThread* m_tThreadPoolMangerThread; 00054 std::vector<SallyAPI::System::CSmartThreadPool*> m_vThreadList; 00055 SallyAPI::System::CCritSection m_Lock; 00056 00057 CSmartThreadPoolManager(); 00058 ~CSmartThreadPoolManager(); 00059 public: 00060 static SallyAPI::System::CSmartThreadPoolManager* GetInstance(); 00061 static void DeleteInstance(); 00062 00063 void DeleteSmartThreadPool(SallyAPI::System::CSmartThreadPool* smartThreadPool); 00064 bool DeleteNext(); 00065 }; 00066 } 00067 }