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
path: root/base
diff options
context:
space:
mode:
authorDmitry Yunitsky <yunik@mapswithme.com>2016-03-09 19:30:18 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:52:39 +0300
commit54e635d8b2e1d7e281e5b00edc2127b87b59c9e7 (patch)
tree8345dd228bee554b2ff5d57a9ce6334381fc9658 /base
parentea139eedc8c41744909537a02c1c6fe5f979066c (diff)
Attach/detach DeferredTask on Android correctly.
Diffstat (limited to 'base')
-rw-r--r--base/deferred_task.cpp2
-rw-r--r--base/deferred_task.hpp5
-rw-r--r--base/thread.cpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/base/deferred_task.cpp b/base/deferred_task.cpp
index ccb9edd322..b6d76e0029 100644
--- a/base/deferred_task.cpp
+++ b/base/deferred_task.cpp
@@ -4,7 +4,7 @@ namespace my
{
DeferredTask::DeferredTask(TDuration const & duration) : m_duration(duration)
{
- m_thread = thread([this]
+ m_thread = threads::SimpleThread([this]
{
unique_lock<mutex> l(m_mutex);
while (!m_terminate)
diff --git a/base/deferred_task.hpp b/base/deferred_task.hpp
index 6ef785ef02..de9b9e40cc 100644
--- a/base/deferred_task.hpp
+++ b/base/deferred_task.hpp
@@ -1,17 +1,18 @@
#pragma once
+#include "base/thread.hpp"
+
#include "std/chrono.hpp"
#include "std/condition_variable.hpp"
#include "std/function.hpp"
#include "std/mutex.hpp"
-#include "std/thread.hpp"
namespace my
{
class DeferredTask
{
using TDuration = duration<double>;
- thread m_thread;
+ threads::SimpleThread m_thread;
mutex m_mutex;
condition_variable m_cv;
function<void()> m_fn;
diff --git a/base/thread.cpp b/base/thread.cpp
index 6be546cd1b..2c3bc913e8 100644
--- a/base/thread.cpp
+++ b/base/thread.cpp
@@ -121,4 +121,4 @@ void SimpleThread::ThreadFunc(function<void()> && fn)
AndroidThreadDetachFromJVM();
#endif // defined(OMIM_OS_ANDROID)
}
-}
+} // namespace threads