diff options
Diffstat (limited to 'search/search_engine.cpp')
-rw-r--r-- | search/search_engine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/search/search_engine.cpp b/search/search_engine.cpp index 4f7b150382..078c845d04 100644 --- a/search/search_engine.cpp +++ b/search/search_engine.cpp @@ -246,6 +246,9 @@ void Engine::SearchAsync() Results res; + // Call m_pQuery->IsCanceled() everywhere it needed without storing return value. + // This flag can be changed from another thread. + try { if (params.m_query.empty()) @@ -291,6 +294,9 @@ void Engine::SearchAsync() if (res.GetCount() > count) params.m_callback(res); } + + // Emit finish marker to client. + params.m_callback(Results::GetEndMarker(m_pQuery->IsCanceled())); } string Engine::GetCountryFile(m2::PointD const & pt) |