103{
104#ifdef WIN32
105 std::thread::native_handle_type handle =
m_ThreadImp.native_handle();
106#endif
107
108 bool _ok = true;
109
110 switch (priority)
111 {
112#ifdef WIN32
114 _ok = SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL);
115 break;
117 _ok = SetThreadPriority(handle, THREAD_PRIORITY_HIGHEST);
118 break;
120 _ok = SetThreadPriority(handle, THREAD_PRIORITY_ABOVE_NORMAL);
121 break;
123 _ok = SetThreadPriority(handle, THREAD_PRIORITY_NORMAL);
124 break;
126 _ok = SetThreadPriority(handle, THREAD_PRIORITY_BELOW_NORMAL);
127 break;
129 _ok = SetThreadPriority(handle, THREAD_PRIORITY_LOWEST);
130 break;
132 _ok = SetThreadPriority(handle, THREAD_PRIORITY_IDLE);
133 break;
134#endif
135 default:
136 break;
137 }
138
139
141}
#define ASSERT
Definition: Errors.h:68
@ Priority_Lowest
Definition: Threading.h:47
@ Priority_Idle
Definition: Threading.h:46
@ Priority_Low
Definition: Threading.h:48
@ Priority_Normal
Definition: Threading.h:49
@ Priority_High
Definition: Threading.h:50
@ Priority_Realtime
Definition: Threading.h:52
@ Priority_Highest
Definition: Threading.h:51