Browse Source

Merge commit '24de9b8' into cg_merges_20121208

Luke Dashjr 13 years ago
parent
commit
53cf110e23
1 changed files with 4 additions and 5 deletions
  1. 4 5
      miner.c

+ 4 - 5
miner.c

@@ -3418,9 +3418,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();
+			ts = __total_staged();
+		}
 		mutex_unlock(stgd_lock);
 		if (ts > opt_queue)
 			continue;
@@ -8063,9 +8064,7 @@ begin_bench:
 	pthread_cond_wait(&kill_cond, &kill_lock);
 	mutex_unlock(&kill_lock);
 
-	applog(LOG_INFO, "workio thread dead, exiting.");
-
-	clean_up();
+	applog(LOG_INFO, "Given kill message, exiting.");
 
 	/* Not really necessary, but let's clean this up too anyway */
 	HASH_ITER(hh, staged_work, work, tmpwork) {