Test attributes: fixing wrongful lambda capture

constexpr doesn't need to be captured. failed ci/cd
pull/3128/head
Felix Heitmann 11 months ago committed by M4rFri
parent 25cfceca04
commit c8596c05ce
No known key found for this signature in database

@ -182,7 +182,7 @@ TEST_CASE("attribute test - multi threaded") {
// put attributes with multiple threads simultaneously // put attributes with multiple threads simultaneously
std::vector<std::future<void>> tasks; std::vector<std::future<void>> tasks;
for (unsigned int i = 0; i < n_tasks; ++i) { for (unsigned int i = 0; i < n_tasks; ++i) {
auto task = std::async([&logger, i, n_values] { auto task = std::async([&logger, i] {
for (auto j = 0; j < n_values; ++j) for (auto j = 0; j < n_values; ++j)
logger.attrs().put(fmt_lib::format("log_{}_key_{}", i, j), fmt_lib::format("log_{}_value_{}", i, j)); logger.attrs().put(fmt_lib::format("log_{}_key_{}", i, j), fmt_lib::format("log_{}_value_{}", i, j));
}); });

Loading…
Cancel
Save