diff --git a/indexer/data_source.hpp b/indexer/data_source.hpp index 66636fb3b7..9464b34448 100644 --- a/indexer/data_source.hpp +++ b/indexer/data_source.hpp @@ -89,11 +89,10 @@ public: /// Guard for loading features from particular MWM by demand. /// @note This guard is suitable when mwm is loaded. -/// @note If you need to work with |FeatureType| from different threads you need to use -/// a unique |FeaturesLoaderGuard| instance for every threads. Construction of -/// |FeaturesLoaderGuard| should be serialized. Then instances of |FeaturesLoaderGuard| -/// may be used concurrently. The example of concurrent use of |FeaturesLoaderGuard| -/// please see |ConcurrentFeatureParsingTest|. +/// @note If you need to work with FeatureType from different threads you need to use +/// a unique FeaturesLoaderGuard instance for every thread. But construction of instances of +/// FeaturesLoaderGuard should be serialized. For an example of concurrent extracting feature +/// details please see ConcurrentFeatureParsingTest. class FeaturesLoaderGuard { public: diff --git a/routing/routing_integration_tests/concurrent_feature_parsing_test.cpp b/routing/routing_integration_tests/concurrent_feature_parsing_test.cpp index 01b038df02..518ba95f0f 100644 --- a/routing/routing_integration_tests/concurrent_feature_parsing_test.cpp +++ b/routing/routing_integration_tests/concurrent_feature_parsing_test.cpp @@ -71,8 +71,8 @@ void TestConcurrentAccessToFeatures(string const & mwm) futures.reserve(threadNumber); vector> pointsByThreads; pointsByThreads.resize(threadNumber); - for (size_t i = 0; i < threadNumber - 1; ++i) - futures.push_back(std::async(std::launch::async, parseGeometries, ref(pointsByThreads[i]))); + for (size_t i = 0; i + 1 < threadNumber; ++i) + futures.push_back(async(launch::async, parseGeometries, ref(pointsByThreads[i]))); parseGeometries(pointsByThreads[threadNumber - 1]); for (auto const & fut : futures)