diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2019-02-12 11:43:18 +0200 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2019-02-12 17:56:35 +0200 |
commit | 1fadf563688785a51ce4fe935a7865d05e3e72a9 (patch) | |
tree | 764c86b7ea5965556a9c0ca7562e78d467587e85 /platform/android/src/run_loop_impl.hpp | |
parent | ca7d9422b6703a4da54ab2fd9da489496b5c4037 (diff) | |
download | qtlocation-mapboxgl-1fadf563688785a51ce4fe935a7865d05e3e72a9.tar.gz |
[android] change lock scope in run_loop to avoid deadlocks. simplify as
well
Diffstat (limited to 'platform/android/src/run_loop_impl.hpp')
-rw-r--r-- | platform/android/src/run_loop_impl.hpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/platform/android/src/run_loop_impl.hpp b/platform/android/src/run_loop_impl.hpp index 9f4dec476e..0a9ea156fd 100644 --- a/platform/android/src/run_loop_impl.hpp +++ b/platform/android/src/run_loop_impl.hpp @@ -26,8 +26,6 @@ public: virtual void runTask() = 0; virtual TimePoint dueTime() const = 0; - - std::list<Runnable*>::iterator iter; }; Impl(RunLoop*, RunLoop::Type); @@ -37,7 +35,6 @@ public: void addRunnable(Runnable*); void removeRunnable(Runnable*); - void initRunnable(Runnable*); Milliseconds processRunnables(); @@ -55,9 +52,8 @@ private: std::unique_ptr<Thread<Alarm>> alarm; - std::recursive_mutex mtx; + std::mutex mutex; std::list<Runnable*> runnables; - std::list<Runnable*>::iterator nextRunnable = runnables.end(); }; } // namespace util |