#1363 Fixed main thread priority.

This commit is contained in:
XMRig 2019-12-03 18:28:10 +07:00
parent c3fd5835c3
commit 05421057ae
No known key found for this signature in database
GPG key ID: 446A53638BE94409
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