aboutsummaryrefslogtreecommitdiff
path: root/src/checkqueue.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-03-06 22:31:26 -0500
committerGavin Andresen <gavinandresen@gmail.com>2013-04-03 19:57:13 -0400
commit21eb5adadbe3110a8708f2570185566e1f137a49 (patch)
tree706908964d4a02c6d2fc2fe8968a65c449a3c38a /src/checkqueue.h
parent72f14d26ecc67a210a29d7914e580b8e67e45d8e (diff)
Port Thread* methods to boost::thread_group
Diffstat (limited to 'src/checkqueue.h')
-rw-r--r--src/checkqueue.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/checkqueue.h b/src/checkqueue.h
index 12dde36fe7..eba424fbaa 100644
--- a/src/checkqueue.h
+++ b/src/checkqueue.h
@@ -33,9 +33,6 @@ private:
// Master thread blocks on this when out of work
boost::condition_variable condMaster;
- // Quit method blocks on this until all workers are gone
- boost::condition_variable condQuit;
-
// The queue of elements to be processed.
// As the order of booleans doesn't matter, it is used as a LIFO (stack)
std::vector<T> queue;
@@ -85,8 +82,6 @@ private:
while (queue.empty()) {
if ((fMaster || fQuit) && nTodo == 0) {
nTotal--;
- if (nTotal==0)
- condQuit.notify_one();
bool fRet = fAllOk;
// reset the status for new work later
if (fMaster)
@@ -151,20 +146,7 @@ public:
condWorker.notify_all();
}
- // Shut the queue down
- void Quit() {
- boost::unique_lock<boost::mutex> lock(mutex);
- fQuit = true;
- // No need to wake the master, as he will quit automatically when all jobs are
- // done.
- condWorker.notify_all();
-
- while (nTotal > 0)
- condQuit.wait(lock);
- }
-
~CCheckQueue() {
- Quit();
}
friend class CCheckQueueControl<T>;