ConditionVariable.h 518 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include "utils/NonCopyable.h"
  3. #include <stdint.h>
  4. namespace il2cpp
  5. {
  6. namespace os
  7. {
  8. class FastMutex;
  9. class ConditionVariableImpl;
  10. class ConditionVariable : public il2cpp::utils::NonCopyable
  11. {
  12. public:
  13. ConditionVariable();
  14. ~ConditionVariable();
  15. int Wait(FastMutex* lock);
  16. int TimedWait(FastMutex* lock, uint32_t timeout_ms);
  17. void Broadcast();
  18. void Signal();
  19. private:
  20. ConditionVariableImpl* m_ConditionVariable;
  21. };
  22. }
  23. }