diff options
Diffstat (limited to 'core/os/thread.h')
-rw-r--r-- | core/os/thread.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/os/thread.h b/core/os/thread.h index 3e307adfff..cc954678f9 100644 --- a/core/os/thread.h +++ b/core/os/thread.h @@ -42,7 +42,14 @@ #include "core/templates/safe_refcount.h" #include "core/typedefs.h" +#ifdef MINGW_ENABLED +#define MINGW_STDTHREAD_REDUNDANCY_WARNING +#include "thirdparty/mingw-std-threads/mingw.thread.h" +#define THREADING_NAMESPACE mingw_stdthread +#else #include <thread> +#define THREADING_NAMESPACE std +#endif class String; @@ -82,7 +89,7 @@ private: ID id = UNASSIGNED_ID; static SafeNumeric<uint64_t> id_counter; static thread_local ID caller_id; - std::thread thread; + THREADING_NAMESPACE::thread thread; static void callback(ID p_caller_id, const Settings &p_settings, Thread::Callback p_callback, void *p_userdata); |