Allow partially started threads.

This commit is contained in:
XMRig 2019-09-17 02:22:59 +07:00
parent e8acb8a2a9
commit e3fcb99d84
14 changed files with 94 additions and 37 deletions

View file

@ -26,10 +26,11 @@
#define XMRIG_THREAD_H
#include <thread>
#include "backend/common/interfaces/IWorker.h"
#include "base/tools/Object.h"
#include <thread>
namespace xmrig {
@ -42,6 +43,8 @@ template<class T>
class Thread
{
public:
XMRIG_DISABLE_COPY_MOVE_DEFAULT(Thread)
inline Thread(IBackend *backend, size_t id, const T &config) : m_id(id), m_config(config), m_backend(backend) {}
inline ~Thread() { m_thread.join(); delete m_worker; }