Move selfTest to threads, remove legacy CryptoNight.cpp.

This commit is contained in:
XMRig 2018-04-03 14:51:05 +07:00
parent d7c5630509
commit 5c6ec587ac
11 changed files with 85 additions and 218 deletions

View file

@ -22,6 +22,7 @@
*/
#include <cmath>
#include <thread>
#include "api/Api.h"
@ -171,7 +172,13 @@ void Workers::onReady(void *arg)
handle->setWorker(new SingleWorker(handle));
}
handle->worker()->start();
const bool rc = handle->worker()->start();
if (!rc) {
uv_mutex_lock(&m_mutex);
LOG_ERR("thread %zu error: \"hash self-test failed\".", handle->worker()->id());
uv_mutex_unlock(&m_mutex);
}
}