Move selfTest to threads, remove legacy CryptoNight.cpp.
This commit is contained in:
parent
d7c5630509
commit
5c6ec587ac
11 changed files with 85 additions and 218 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue