diff options
Diffstat (limited to 'platform/winrt/thread_winrt.cpp')
-rw-r--r-- | platform/winrt/thread_winrt.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/platform/winrt/thread_winrt.cpp b/platform/winrt/thread_winrt.cpp new file mode 100644 index 0000000000..3217292bee --- /dev/null +++ b/platform/winrt/thread_winrt.cpp @@ -0,0 +1,42 @@ +#include "thread_winrt.h" + +#include "os/memory.h" + +Thread* ThreadWinrt::create_func_winrt(ThreadCreateCallback p_callback,void *p_user,const Settings&) { + + ThreadWinrt* thread = memnew(ThreadWinrt); + std::thread new_thread(p_callback, p_user); + std::swap(thread->thread, new_thread); + + return thread; +}; + +Thread::ID ThreadWinrt::get_thread_ID_func_winrt() { + + return std::hash<std::thread::id>()(std::this_thread::get_id()); +}; + +void ThreadWinrt::wait_to_finish_func_winrt(Thread* p_thread) { + + ThreadWinrt *tp=static_cast<ThreadWinrt*>(p_thread); + tp->thread.join(); +}; + + +Thread::ID ThreadWinrt::get_ID() const { + + return std::hash<std::thread::id>()(thread.get_id()); +}; + +void ThreadWinrt::make_default() { + +}; + +ThreadWinrt::ThreadWinrt() { + +}; + +ThreadWinrt::~ThreadWinrt() { + +}; + |