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 b59b19f commit 50dbe3bCopy full SHA for 50dbe3b
src/querying.h
@@ -99,9 +99,8 @@ void query_batched(
99
100
std::vector<std::thread> threads;
101
// assign work to threads
102
- for(int i = 0; i < opt.numThreads; ++i) {
103
- threads.emplace_back([&] {
104
- const int threadId = i;
+ for(int threadId = 0; threadId < opt.numThreads; ++threadId) {
+ threads.emplace_back([&,threadId] {
105
try {
106
sequence_pair_reader reader{filename1, filename2};
107
@@ -182,7 +181,7 @@ void query_batched(
182
181
}
183
184
catch(file_access_error& e) {
185
- if(threadId == 1) {
+ if(threadId == 0) {
186
std::lock_guard<std::mutex> lock(exceptionMtx);
187
log(std::string("FAIL: ") + e.what());
188
0 commit comments