blob: 3217292bee0b5e7ce116303f108f4f2337bf92fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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() {
};
|