MCPcopy Create free account
hub / github.com/catboost/catboost / SetHighestThreadPriority

Function SetHighestThreadPriority

util/system/thread.cpp:36–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34#endif
35
36bool SetHighestThreadPriority() {
37#ifdef _win_
38 return SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST);
39#else
40 struct sched_param sch;
41 memset(&sch, 0, sizeof(sch));
42 sch.sched_priority = 31;
43 return pthread_setschedparam(pthread_self(), SCHED_RR, &sch) == 0;
44#endif
45}
46
47bool SetLowestThreadPriority() {
48#ifdef _win_

Callers 10

ThreadFuncMethod · 0.85
ExecServerThreadMethod · 0.85
RecvThreadFuncMethod · 0.85
ExecServerThreadMethod · 0.85
ThreadFuncMethod · 0.85
ExecServerThreadMethod · 0.85
ExecuteRecvMethod · 0.85
ExecuteSendMethod · 0.85
ExecServerThreadMethod · 0.85
DoExecuteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected