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 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; - thread m_thread; + threads::SimpleThread m_thread; mutex m_mutex; condition_variable m_cv; function 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 && fn) AndroidThreadDetachFromJVM(); #endif // defined(OMIM_OS_ANDROID) } -} +} // namespace threads