From 8a3c858d36026b7aaab369b094dea619da266cf8 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 1 Jun 2018 17:09:22 +0300 Subject: [PATCH] bench --- example/bench.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example/bench.cpp b/example/bench.cpp index 584bee1e..a4f7ce5b 100644 --- a/example/bench.cpp +++ b/example/bench.cpp @@ -74,13 +74,14 @@ int main(int argc, char *argv[]) cout << "async logging.. " << threads << " threads sharing same logger, " << format(howmany) << " iterations " << endl; cout << "*******************************************************************************\n"; - spdlog::init_thread_pool(queue_size, 1); + for (int i = 0; i < 3; ++i) { + spdlog::init_thread_pool(queue_size, 1); auto as = spdlog::basic_logger_mt("as", "logs/basic_async.log", true); bench_mt(howmany, as, threads); spdlog::drop("as"); - spdlog::thread_pool()->wait_empty(); + } } catch (std::exception &ex)