summaryrefslogtreecommitdiffstats
path: root/core/os/condition_variable.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/condition_variable.h')
-rw-r--r--core/os/condition_variable.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/os/condition_variable.h b/core/os/condition_variable.h
index 6a49ced31b..2b6b272e18 100644
--- a/core/os/condition_variable.h
+++ b/core/os/condition_variable.h
@@ -33,6 +33,8 @@
#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"
@@ -66,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