diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2017-08-14 14:16:42 +0300 |
---|---|---|
committer | Yuri Gorshenin <mipt.vi002@gmail.com> | 2017-08-14 15:37:42 +0300 |
commit | 6bf8b07db5e8f594407973ab336f2e118321f4ac (patch) | |
tree | 7e89d836def728f82df2eea623897431f1c875a0 /partners_api/viator_api.cpp | |
parent | 580e23357cac94b080cebf90910bfef0ce9991f0 (diff) |
[partners_api] use single network thread for all api
Diffstat (limited to 'partners_api/viator_api.cpp')
-rw-r--r-- | partners_api/viator_api.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/partners_api/viator_api.cpp b/partners_api/viator_api.cpp index d6f7db1d26..3555d06236 100644 --- a/partners_api/viator_api.cpp +++ b/partners_api/viator_api.cpp @@ -1,6 +1,7 @@ #include "partners_api/viator_api.hpp" #include "platform/http_client.hpp" +#include "platform/platform.hpp" #include "platform/preferred_languages.hpp" #include "coding/multilang_utf8_string.hpp" @@ -213,7 +214,7 @@ void Api::GetTop5Products(std::string const & destId, std::string const & curren std::string curr = kSupportedCurrencies.find(currency) == kSupportedCurrencies.cend() ? "USD" : currency; - threads::SimpleThread([destId, curr, fn]() + GetPlatform().RunOnNetworkThread([destId, curr, fn]() { string result; if (!RawApi::GetTopProducts(destId, curr, 5, result)) @@ -233,7 +234,7 @@ void Api::GetTop5Products(std::string const & destId, std::string const & curren SortProducts(products); fn(destId, products); - }).detach(); + }); } bool operator<(Product const & lhs, Product const & rhs) |