mirror of
https://github.com/xmrig/xmrig.git
synced 2026-02-01 17:53:03 -05:00
Added CPU option "yield".
This commit is contained in:
@@ -58,6 +58,7 @@ xmrig::CpuWorker<N>::CpuWorker(size_t id, const CpuLaunchData &data) :
|
||||
m_algorithm(data.algorithm),
|
||||
m_assembly(data.assembly),
|
||||
m_hwAES(data.hwAES),
|
||||
m_yield(data.yield),
|
||||
m_av(data.av()),
|
||||
m_miner(data.miner),
|
||||
m_ctx()
|
||||
@@ -236,6 +237,10 @@ void xmrig::CpuWorker<N>::start()
|
||||
}
|
||||
|
||||
m_count += N;
|
||||
|
||||
if (m_yield) {
|
||||
std::this_thread::yield();
|
||||
}
|
||||
}
|
||||
|
||||
consumeJob();
|
||||
|
||||
Reference in New Issue
Block a user