mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-11 01:22:45 -05:00
possible race fix in Worker
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user