mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-08 00:15:04 -05:00
possible race fix in Worker
This commit is contained in:
@@ -20,6 +20,9 @@
|
||||
#define XMRIG_WORKER_H
|
||||
|
||||
|
||||
#include <atomic>
|
||||
|
||||
|
||||
#include "backend/common/interfaces/IWorker.h"
|
||||
|
||||
|
||||
@@ -36,7 +39,7 @@ protected:
|
||||
inline size_t id() const override { return m_id; }
|
||||
inline uint32_t node() const { return m_node; }
|
||||
|
||||
uint64_t m_count = 0;
|
||||
std::atomic<uint64_t> m_count = {0};
|
||||
|
||||
private:
|
||||
const int64_t m_affinity;
|
||||
|
||||
Reference in New Issue
Block a user