1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-17 03:22:48 -05:00

Added initial support for new style threads launch method.

This commit is contained in:
XMRig
2019-07-16 22:10:50 +07:00
parent dff59fabc2
commit 27f3008d79
32 changed files with 1429 additions and 505 deletions

View File

@@ -28,12 +28,12 @@
#include "backend/cpu/Cpu.h"
#include "core/Controller.h"
#include "core/Miner.h"
#include "net/Network.h"
xmrig::Controller::Controller(Process *process) :
Base(process),
m_network(nullptr)
Base(process)
{
}
@@ -68,6 +68,8 @@ void xmrig::Controller::start()
{
Base::start();
m_miner = new Miner(this);
network()->connect();
}
@@ -78,6 +80,19 @@ void xmrig::Controller::stop()
delete m_network;
m_network = nullptr;
m_miner->stop();
delete m_miner;
m_miner = nullptr;
}
xmrig::Miner *xmrig::Controller::miner() const
{
assert(m_miner != nullptr);
return m_miner;
}