Browse Source

Only recalculate total_staged in getwork thread if required.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
84b44fd852
  1. 3
      cgminer.c

3
cgminer.c

@ -3067,9 +3067,10 @@ static void *getwork_thread(void __maybe_unused *userdata) @@ -3067,9 +3067,10 @@ static void *getwork_thread(void __maybe_unused *userdata)
lagging = true;
/* Wait until hash_pop tells us we need to create more work */
if (ts > opt_queue)
if (ts > opt_queue) {
pthread_cond_wait(&gws_cond, stgd_lock);
ts = __total_staged();
}
mutex_unlock(stgd_lock);
if (ts > opt_queue)
continue;

Loading…
Cancel
Save