diff options
Diffstat (limited to 'core/os/thread.h')
-rw-r--r-- | core/os/thread.h | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/core/os/thread.h b/core/os/thread.h index 0fb283e224..7462ec17fb 100644 --- a/core/os/thread.h +++ b/core/os/thread.h @@ -35,15 +35,14 @@ #ifdef PLATFORM_THREAD_OVERRIDE #include "platform_thread.h" #else + #ifndef THREAD_H #define THREAD_H +#include "core/templates/safe_refcount.h" #include "core/typedefs.h" -#if !defined(NO_THREADS) -#include "core/templates/safe_refcount.h" #include <thread> -#endif class String; @@ -65,7 +64,6 @@ public: }; private: -#if !defined(NO_THREADS) friend class Main; static ID main_thread_id; @@ -82,7 +80,6 @@ private: static void (*set_priority_func)(Thread::Priority); static void (*init_func)(); static void (*term_func)(); -#endif public: static void _set_platform_funcs( @@ -91,7 +88,6 @@ public: void (*p_init_func)() = nullptr, void (*p_term_func)() = nullptr); -#if !defined(NO_THREADS) _FORCE_INLINE_ ID get_id() const { return id; } // get the ID of the caller thread _FORCE_INLINE_ static ID get_caller_id() { return caller_id; } @@ -107,19 +103,6 @@ public: Thread(); ~Thread(); -#else - _FORCE_INLINE_ ID get_id() const { return 0; } - // get the ID of the caller thread - _FORCE_INLINE_ static ID get_caller_id() { return 0; } - // get the ID of the main thread - _FORCE_INLINE_ static ID get_main_id() { return 0; } - - static Error set_name(const String &p_name) { return ERR_UNAVAILABLE; } - - void start(Thread::Callback p_callback, void *p_user, const Settings &p_settings = Settings()) {} - bool is_started() const { return false; } - void wait_to_finish() {} -#endif }; #endif // THREAD_H |