#1363 Fixed main thread priority.

This commit is contained in:
XMRig
2019-12-03 18:28:10 +07:00
parent 1797fe3e20
commit 75195e95d3
7 changed files with 5 additions and 54 deletions

View File

@@ -263,6 +263,11 @@ public:
xmrig::Miner::Miner(Controller *controller)
: d_ptr(new MinerPrivate(controller))
{
const int priority = controller->config()->cpu().priority();
if (priority >= 0) {
Platform::setThreadPriority(std::min(priority + 1, 5));
}
# ifdef XMRIG_ALGO_RANDOMX
Rx::init(this);
# endif