mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-10 09:02:45 -05:00
Always stop mining threads in RandomX dataset change upcoming.
This commit is contained in:
@@ -54,7 +54,7 @@ namespace xmrig {
|
||||
class RxPrivate;
|
||||
|
||||
|
||||
static const char *tag = BLUE_BG(WHITE_BOLD_S " rx ") " ";
|
||||
static const char *tag = BLUE_BG(WHITE_BOLD_S " rx ") " ";
|
||||
static RxPrivate *d_ptr = nullptr;
|
||||
|
||||
|
||||
@@ -231,6 +231,14 @@ private:
|
||||
} // namespace xmrig
|
||||
|
||||
|
||||
bool xmrig::Rx::isReady(const Job &job)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(d_ptr->mutex);
|
||||
|
||||
return d_ptr->isReady(job);
|
||||
}
|
||||
|
||||
|
||||
xmrig::RxDataset *xmrig::Rx::dataset(const Job &job, uint32_t nodeId)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(d_ptr->mutex);
|
||||
|
||||
@@ -44,6 +44,7 @@ class Job;
|
||||
class Rx
|
||||
{
|
||||
public:
|
||||
static bool isReady(const Job &job);
|
||||
static RxDataset *dataset(const Job &job, uint32_t nodeId);
|
||||
static std::pair<size_t, size_t> hugePages();
|
||||
static void destroy();
|
||||
|
||||
Reference in New Issue
Block a user