Only save config if threads were automatically calculated
This commit is contained in:
parent
c33802280e
commit
2979b2c872
1 changed files with 2 additions and 2 deletions
|
@ -198,19 +198,19 @@ bool xmrig::Config::finalize()
|
||||||
|
|
||||||
if (!m_threads[pa].count) {
|
if (!m_threads[pa].count) {
|
||||||
m_threads[pa].count = Cpu::optimalThreadsCount(size, m_maxCpuUsage);
|
m_threads[pa].count = Cpu::optimalThreadsCount(size, m_maxCpuUsage);
|
||||||
|
m_shouldSave = true;
|
||||||
}
|
}
|
||||||
else if (m_safe) {
|
else if (m_safe) {
|
||||||
const size_t count = Cpu::optimalThreadsCount(size, m_maxCpuUsage);
|
const size_t count = Cpu::optimalThreadsCount(size, m_maxCpuUsage);
|
||||||
if (m_threads[pa].count > count) {
|
if (m_threads[pa].count > count) {
|
||||||
m_threads[pa].count = count;
|
m_threads[pa].count = count;
|
||||||
|
m_shouldSave = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < m_threads[pa].count; ++i) {
|
for (size_t i = 0; i < m_threads[pa].count; ++i) {
|
||||||
m_threads[pa].list.push_back(CpuThread::createFromAV(i, xmrig::Algorithm(pa).algo(), av, m_threads[pa].mask, m_priority));
|
m_threads[pa].list.push_back(CpuThread::createFromAV(i, xmrig::Algorithm(pa).algo(), av, m_threads[pa].mask, m_priority));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_shouldSave = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue