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 7efc628 commit c43aa62Copy full SHA for c43aa62
src/checkqueue.h
@@ -167,12 +167,15 @@ class CCheckQueue
167
//! Add a batch of checks to the queue
168
void Add(std::vector<T>& vChecks)
169
{
170
- LOCK(m_mutex);
171
- for (T& check : vChecks) {
172
- queue.push_back(T());
173
- check.swap(queue.back());
+ {
+ LOCK(m_mutex);
+ for (T& check : vChecks) {
+ queue.emplace_back();
174
+ check.swap(queue.back());
175
+ }
176
+ nTodo += vChecks.size();
177
}
- nTodo += vChecks.size();
178
+
179
if (vChecks.size() == 1)
180
m_worker_cv.notify_one();
181
else if (vChecks.size() > 1)
0 commit comments