diff options
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) |