mirror of
https://github.com/xmrig/xmrig.git
synced 2025-03-12 09:37:35 +00:00
Fixed bugs.
This commit is contained in:
parent
6f93b7b38d
commit
871bc3e180
2 changed files with 5 additions and 3 deletions
|
@ -29,11 +29,13 @@
|
|||
#include <uv.h>
|
||||
|
||||
|
||||
#include "backend/common/interfaces/IWorker.h"
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
||||
|
||||
class IBackend;
|
||||
class IWorker;
|
||||
|
||||
|
||||
template<class T>
|
||||
|
@ -41,7 +43,7 @@ class Thread
|
|||
{
|
||||
public:
|
||||
inline Thread(IBackend *backend, size_t index, const T &config) : m_index(index), m_config(config), m_backend(backend) {}
|
||||
inline ~Thread() { uv_thread_join(&m_thread); }
|
||||
inline ~Thread() { uv_thread_join(&m_thread); delete m_worker; }
|
||||
|
||||
inline const T &config() const { return m_config; }
|
||||
inline IBackend *backend() const { return m_backend; }
|
||||
|
|
|
@ -158,7 +158,7 @@ void xmrig::CpuWorker<N>::start()
|
|||
do {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||
}
|
||||
while (Nonce::isPaused());
|
||||
while (Nonce::isPaused() && Nonce::sequence(Nonce::CPU) > 0);
|
||||
|
||||
if (Nonce::sequence(Nonce::CPU) == 0) {
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue