Skip to content
Snippets Groups Projects
Commit 50bcd2e7 authored by mantid-builder's avatar mantid-builder Committed by Igor Gudich
Browse files

Correct sync in producer consumer

re #23268
parent 62cf36bd
No related branches found
No related tags found
No related merge requests found
......@@ -306,7 +306,13 @@ void MultiProcessEventLoader::GroupLoader<
});
auto processQueue = [&]() {
while (!queue.empty()) {
std::size_t qsz{0};
{
std::lock_guard<std::mutex> lock(mutex);
qsz = queue.size();
}
while (qsz > 0) {
std::unique_ptr<Task> task;
{
std::lock_guard<std::mutex> lock(mutex);
......@@ -316,6 +322,7 @@ void MultiProcessEventLoader::GroupLoader<
for (unsigned i = 0; i < task->eventId.size(); ++i)
pixels.at(task->eventId[i])
.emplace_back(task->eventTimeOffset[i], task->partitioner->next());
--qsz;
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment