diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 5000b0e2455..f78ce137372 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -73,30 +73,10 @@ private: std::deque> queue; bool running; size_t maxDepth; - int numThreads; - - /** RAII object to keep track of number of running worker threads */ - class ThreadCounter - { - public: - WorkQueue &wq; - explicit ThreadCounter(WorkQueue &w): wq(w) - { - std::lock_guard lock(wq.cs); - wq.numThreads += 1; - } - ~ThreadCounter() - { - std::lock_guard lock(wq.cs); - wq.numThreads -= 1; - wq.cond.notify_all(); - } - }; public: explicit WorkQueue(size_t _maxDepth) : running(true), - maxDepth(_maxDepth), - numThreads(0) + maxDepth(_maxDepth) { } /** Precondition: worker threads have all stopped (they have been joined). @@ -118,7 +98,6 @@ public: /** Thread function */ void Run() { - ThreadCounter count(*this); while (true) { std::unique_ptr i; {