RandomX: don't restart mining threads when the seed changes
It helps to not loose huge pages when the seed changes (every 2048 blocks, ~2.8 days).
This commit is contained in:
parent
5747ccfafc
commit
7f2f50a8d9
3 changed files with 11 additions and 3 deletions
|
@ -134,7 +134,7 @@ void xmrig::CpuWorker<N>::allocateRandomX_VM()
|
|||
RxDataset *dataset = Rx::dataset(m_job.currentJob(), node());
|
||||
|
||||
while (dataset == nullptr) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(20));
|
||||
|
||||
if (Nonce::sequence(Nonce::CPU) == 0) {
|
||||
return;
|
||||
|
@ -246,7 +246,7 @@ void xmrig::CpuWorker<N>::start()
|
|||
while (Nonce::sequence(Nonce::CPU) > 0) {
|
||||
if (Nonce::isPaused()) {
|
||||
do {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(20));
|
||||
}
|
||||
while (Nonce::isPaused() && Nonce::sequence(Nonce::CPU) > 0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue