Skip to content
Snippets Groups Projects
Commit ac359da0 authored by Lorenz Gruber's avatar Lorenz Gruber
Browse files

fixed concurrent access to single db connection

parent 61f47dcb
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,10 @@ public:
for(const auto & job: jobsToRun) {
executor(job);
}
std::ranges::for_each(this->listener,[this](auto && o){o(*this);});
{
std::lock_guard lock {this->mutex};
std::ranges::for_each(this->listener,[this](auto && o){o(*this);});
}
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
std::ranges::for_each(this->listener,[this](auto && o){o(*this);});
......
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