Bring back SetThreadPriority
This commit is contained in:
13
src/util.cpp
13
src/util.cpp
@@ -789,6 +789,19 @@ bool SetupNetworking()
|
||||
return true;
|
||||
}
|
||||
|
||||
void SetThreadPriority(int nPriority)
|
||||
{
|
||||
#ifdef WIN32
|
||||
SetThreadPriority(GetCurrentThread(), nPriority);
|
||||
#else // WIN32
|
||||
#ifdef PRIO_THREAD
|
||||
setpriority(PRIO_THREAD, 0, nPriority);
|
||||
#else // PRIO_THREAD
|
||||
setpriority(PRIO_PROCESS, 0, nPriority);
|
||||
#endif // PRIO_THREAD
|
||||
#endif // WIN32
|
||||
}
|
||||
|
||||
int GetNumCores()
|
||||
{
|
||||
#if BOOST_VERSION >= 105600
|
||||
|
||||
Reference in New Issue
Block a user