diff --git a/src/extractor/extractor.cpp b/src/extractor/extractor.cpp index 0e2c2633809..7b8d99e69a4 100644 --- a/src/extractor/extractor.cpp +++ b/src/extractor/extractor.cpp @@ -108,15 +108,15 @@ transformTurnLaneMapIntoArrays(const guidance::LaneDescriptionMap &turn_lane_map */ int Extractor::run(ScriptingEnvironment &scripting_environment) { - { - util::LogPolicy::GetInstance().Unmute(); - TIMER_START(extracting); + util::LogPolicy::GetInstance().Unmute(); + TIMER_START(extracting); - const unsigned recommended_num_threads = tbb::task_scheduler_init::default_num_threads(); - const auto number_of_threads = - std::min(recommended_num_threads, config.requested_num_threads); - tbb::task_scheduler_init init(number_of_threads); + const unsigned recommended_num_threads = tbb::task_scheduler_init::default_num_threads(); + const auto number_of_threads = + std::min(recommended_num_threads, config.requested_num_threads); + tbb::task_scheduler_init init(number_of_threads); + { util::SimpleLogger().Write() << "Input file: " << config.input_path.filename().string(); if (!config.profile_path.empty()) { diff --git a/unit_tests/util/static_rtree.cpp b/unit_tests/util/static_rtree.cpp index 3b5de011c15..3df00e5d166 100644 --- a/unit_tests/util/static_rtree.cpp +++ b/unit_tests/util/static_rtree.cpp @@ -25,6 +25,11 @@ #include #include +#include + +// explicit TBB scheduler init to register resources cleanup at exit +tbb::task_scheduler_init init(2); + BOOST_AUTO_TEST_SUITE(static_rtree) using namespace osrm;