Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsentiy Milchakov <milcars@mapswithme.com>2017-08-14 14:16:42 +0300
committerYuri Gorshenin <mipt.vi002@gmail.com>2017-08-14 15:37:42 +0300
commit6bf8b07db5e8f594407973ab336f2e118321f4ac (patch)
tree7e89d836def728f82df2eea623897431f1c875a0 /partners_api/booking_api.cpp
parent580e23357cac94b080cebf90910bfef0ce9991f0 (diff)
[partners_api] use single network thread for all api
Diffstat (limited to 'partners_api/booking_api.cpp')
-rw-r--r--partners_api/booking_api.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/partners_api/booking_api.cpp b/partners_api/booking_api.cpp
index e877ad738a..4d2447c223 100644
--- a/partners_api/booking_api.cpp
+++ b/partners_api/booking_api.cpp
@@ -311,7 +311,7 @@ string Api::GetSearchUrl(string const & city, string const & name) const
void Api::GetMinPrice(string const & hotelId, string const & currency,
GetMinPriceCallback const & fn)
{
- threads::SimpleThread([hotelId, currency, fn]()
+ GetPlatform().RunOnNetworkThread([hotelId, currency, fn]()
{
string minPrice;
string priceCurrency;
@@ -333,12 +333,12 @@ void Api::GetMinPrice(string const & hotelId, string const & currency,
priceCurrency.clear();
}
fn(hotelId, minPrice, priceCurrency);
- }).detach();
+ });
}
void Api::GetHotelInfo(string const & hotelId, string const & lang, GetHotelInfoCallback const & fn)
{
- threads::SimpleThread([hotelId, lang, fn]()
+ GetPlatform().RunOnNetworkThread([hotelId, lang, fn]()
{
HotelInfo info;
info.m_hotelId = hotelId;
@@ -361,7 +361,7 @@ void Api::GetHotelInfo(string const & hotelId, string const & lang, GetHotelInfo
}
fn(info);
- }).detach();
+ });
}
void SetBookingUrlForTesting(string const & url)