1
0
mirror of https://github.com/xmrig/xmrig.git synced 2026-01-23 14:52:52 -05:00

Added IConsoleListener

This commit is contained in:
XMRig
2017-07-23 09:36:30 +03:00
parent 583f45e2da
commit 776f77a8d4
10 changed files with 104 additions and 5 deletions

View File

@@ -69,6 +69,10 @@ void DoubleWorker::start()
}
while (Workers::isPaused());
if (Workers::sequence() == 0) {
break;
}
consumeJob();
}

View File

@@ -45,6 +45,10 @@ void SingleWorker::start()
}
while (Workers::isPaused());
if (Workers::sequence() == 0) {
break;
}
consumeJob();
}

View File

@@ -60,6 +60,12 @@ Job Workers::job()
}
void Workers::printHashrate(bool detail)
{
m_hashrate->print();
}
void Workers::setEnabled(bool enabled)
{
if (m_enabled == enabled) {
@@ -121,6 +127,7 @@ void Workers::stop()
m_hashrate->stop();
uv_close(reinterpret_cast<uv_handle_t*>(&m_async), nullptr);
m_paused = 0;
m_sequence = 0;
for (size_t i = 0; i < m_workers.size(); ++i) {

View File

@@ -43,6 +43,7 @@ class Workers
{
public:
static Job job();
static void printHashrate(bool detail);
static void setEnabled(bool enabled);
static void setJob(const Job &job);
static void start(int64_t affinity);