mirror of
https://github.com/xmrig/xmrig.git
synced 2025-02-07 05:37:51 +00:00
possible race fix in Worker
This commit is contained in:
parent
f7aa5e781b
commit
12690c66d6
1 changed files with 4 additions and 1 deletions
|
@ -20,6 +20,9 @@
|
||||||
#define XMRIG_WORKER_H
|
#define XMRIG_WORKER_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
|
|
||||||
#include "backend/common/interfaces/IWorker.h"
|
#include "backend/common/interfaces/IWorker.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +39,7 @@ protected:
|
||||||
inline size_t id() const override { return m_id; }
|
inline size_t id() const override { return m_id; }
|
||||||
inline uint32_t node() const { return m_node; }
|
inline uint32_t node() const { return m_node; }
|
||||||
|
|
||||||
uint64_t m_count = 0;
|
std::atomic<uint64_t> m_count = {0};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const int64_t m_affinity;
|
const int64_t m_affinity;
|
||||||
|
|
Loading…
Reference in a new issue