HandleMutexManager.h 462 B

123456789101112131415161718192021
  1. #pragma once
  2. #include "string"
  3. #include <map>
  4. #include "Poco/Mutex.h"
  5. #include "Poco/Thread.h"
  6. using namespace::std;
  7. using Poco::FastMutex;
  8. using Poco::Mutex;
  9. using Poco::Thread;
  10. class CHandleMutexManager
  11. {
  12. public:
  13. static int InsertHandleMutex(string stringUuid);
  14. static int DeleteHandleMutex(string stringUuid);
  15. static Mutex* GetHandleMutex(string stringUuid);
  16. private:
  17. static Mutex m_mutexHandleMutex;
  18. static map<string, Mutex*> m_mapHandleAndMutex;
  19. };