#pragma once #include #include #include #include #include class StdCondition { public: StdCondition(); StdCondition(bool init); ~StdCondition(); void Wait(); bool WaitFor(unsigned int millisecond); void Notify(bool istrue); protected: static bool isTrue(StdCondition* scd); protected: bool m_value; std::mutex m_mutex; std::condition_variable m_cv; };