We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c43aa62 commit 459e208Copy full SHA for 459e208
src/checkqueue.h
@@ -167,6 +167,10 @@ class CCheckQueue
167
//! Add a batch of checks to the queue
168
void Add(std::vector<T>& vChecks)
169
{
170
+ if (vChecks.empty()) {
171
+ return;
172
+ }
173
+
174
175
LOCK(m_mutex);
176
for (T& check : vChecks) {
@@ -176,10 +180,11 @@ class CCheckQueue
180
nTodo += vChecks.size();
177
181
}
178
182
179
- if (vChecks.size() == 1)
183
+ if (vChecks.size() == 1) {
184
m_worker_cv.notify_one();
- else if (vChecks.size() > 1)
185
+ } else {
186
m_worker_cv.notify_all();
187
188
189
190
//! Stop all of the worker threads.
0 commit comments