// Copyright (c) 2008-2023 the Urho3D project // License: MIT #pragma once #ifdef URHO3D_IS_BUILDING #include "Urho3D.h" #else #include #endif namespace Urho3D { /// %Condition on which a thread can wait. class URHO3D_API Condition { public: /// Construct. Condition(); /// Destruct. ~Condition(); /// Set the condition. Will be automatically reset once a waiting thread wakes up. void Set(); /// Wait on the condition. void Wait(); private: #ifndef _WIN32 /// Mutex for the event, necessary for pthreads-based implementation. void* mutex_; #endif /// Operating system specific event. void* event_; }; }