prevent manual mutex lock/unlock
This commit is contained in:
parent
e32731b60b
commit
ead82cdba9
4 changed files with 32 additions and 26 deletions
|
@ -452,16 +452,17 @@ void xmrig::CudaBackend::setJob(const Job &job)
|
|||
|
||||
void xmrig::CudaBackend::start(IWorker *worker, bool ready)
|
||||
{
|
||||
mutex.lock();
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
|
||||
if (d_ptr->status.started(ready)) {
|
||||
d_ptr->status.print();
|
||||
if (d_ptr->status.started(ready)) {
|
||||
d_ptr->status.print();
|
||||
|
||||
CudaWorker::ready = true;
|
||||
}
|
||||
|
||||
CudaWorker::ready = true;
|
||||
}
|
||||
|
||||
mutex.unlock();
|
||||
|
||||
if (ready) {
|
||||
worker->start();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue