summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/globalStates.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xmrstak/backend/globalStates.cpp')
-rw-r--r--xmrstak/backend/globalStates.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmrstak/backend/globalStates.cpp b/xmrstak/backend/globalStates.cpp
index 8de6bfe..9f41be2 100644
--- a/xmrstak/backend/globalStates.cpp
+++ b/xmrstak/backend/globalStates.cpp
@@ -46,9 +46,6 @@ void globalStates::consume_work( miner_work& threadWork, uint64_t& currentJobId)
void globalStates::switch_work(miner_work& pWork, pool_data& dat)
{
jobLock.WriteLock();
-
- // this notifies all threads that the job has changed
- iGlobalJobNo++;
size_t xid = dat.pool_id;
dat.pool_id = pool_id;
@@ -61,6 +58,9 @@ void globalStates::switch_work(miner_work& pWork, pool_data& dat)
*/
dat.iSavedNonce = iGlobalNonce.exchange(dat.iSavedNonce, std::memory_order_relaxed);
oGlobalWork = pWork;
+
+ // this notifies all threads that the job has changed
+ iGlobalJobNo++;
jobLock.UnLock();
}
OpenPOWER on IntegriCloud