refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2024-12-03 16:38:38 -06:00
parent 31e20e9af0
commit b9ce21853f

View File

@ -32,12 +32,12 @@ void polling::frequency_thread(
unique_mutex_lock lock(mutex_);
auto futures = std::accumulate(
items_.begin(), items_.end(), std::deque<std::future<void>>{},
[this, &freq](auto &&futures, auto &&item) {
[this, &freq](auto &&list, auto &&item) {
if (item.second.freq != freq) {
return futures;
return list;
}
futures.emplace_back(
list.emplace_back(
std::async(std::launch::async, [this, &freq, item]() -> void {
if (config_->get_event_level() == event_level::trace ||
freq != frequency::second) {
@ -50,7 +50,7 @@ void polling::frequency_thread(
event_system::instance().raise<polling_item_end>(item.first);
}
}));
return futures;
return list;
});
lock.unlock();