diff options
Diffstat (limited to 'mthread.cpp')
-rw-r--r-- | mthread.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mthread.cpp b/mthread.cpp index 4af25ff..89d79bd 100644 --- a/mthread.cpp +++ b/mthread.cpp @@ -90,7 +90,7 @@ bool mthread::find_work() { for(;;) { //find the worker who has the biggest workload worker = distance(loads, max_element(loads, &loads[worker_cnt])); - if(!loads[worker]) break; //we have found a worker; distance is 0 + if(!loads[worker]) return true; //we have found a worker; distance is 0 peer_status = &workers[worker]->status; peer_status->status_lock.lock(); //check to see if canidate is valid. @@ -124,7 +124,7 @@ bool mthread::find_work() { status.status_lock.lock(); status.searching = false; status.status_lock.unlock(); - break; + return true; } return true; } |