diff options
Diffstat (limited to 'core/os/condition_variable.h')
-rw-r--r-- | core/os/condition_variable.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/os/condition_variable.h b/core/os/condition_variable.h index 6a6996019d..2b6b272e18 100644 --- a/core/os/condition_variable.h +++ b/core/os/condition_variable.h @@ -31,6 +31,10 @@ #ifndef CONDITION_VARIABLE_H #define CONDITION_VARIABLE_H +#include "core/os/mutex.h" + +#ifdef THREADS_ENABLED + #ifdef MINGW_ENABLED #define MINGW_STDTHREAD_REDUNDANCY_WARNING #include "thirdparty/mingw-std-threads/mingw.condition_variable.h" @@ -64,4 +68,16 @@ public: } }; +#else // No threads. + +class ConditionVariable { +public: + template <class BinaryMutexT> + void wait(const MutexLock<BinaryMutexT> &p_lock) const {} + void notify_one() const {} + void notify_all() const {} +}; + +#endif // THREADS_ENABLED + #endif // CONDITION_VARIABLE_H |