Fix tests

This commit is contained in:
gabime 2024-12-08 22:37:41 +02:00
parent 374a05026c
commit 924ffc4fbd

View File

@ -113,10 +113,9 @@ TEST_CASE("multi threads", "[async]") {
size_t n_threads = 10;
{
auto [logger, async_sink] = creat_async_logger(queue_size, test_sink);
std::vector<std::thread> threads;
for (size_t i = 0; i < n_threads; i++) {
threads.emplace_back([logger, messages] {
threads.emplace_back([&] {
for (size_t j = 0; j < messages; j++) {
logger->info("Hello message #{}", j);
}