diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-11-16 21:06:18 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-11-16 22:16:08 +0200 |
commit | d9f10fbfa795ae2b5b70265c14184e79f802ebca (patch) | |
tree | 64cd5d420c5016b619d0f4b140beab168bdf17be | |
parent | 42a60a6661d58ebf784407bc5bc4c0ef35179ef8 (diff) | |
download | qtlocation-mapboxgl-d9f10fbfa795ae2b5b70265c14184e79f802ebca.tar.gz |
[core] Use std::mutex on RunLoop
Only the WorkTask mutex needs to be recusive because
the WorkQueue will run a WorkTask that will pop
itself from the WorkQueue causing it to get cancelled.
-rw-r--r-- | src/mbgl/util/run_loop.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/util/run_loop.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/util/run_loop.cpp b/src/mbgl/util/run_loop.cpp index 5c95959460..7f277c9885 100644 --- a/src/mbgl/util/run_loop.cpp +++ b/src/mbgl/util/run_loop.cpp @@ -15,7 +15,7 @@ RunLoop::~RunLoop() { } void RunLoop::withMutex(std::function<void()>&& fn) { - std::lock_guard<std::recursive_mutex> lock(mutex); + std::lock_guard<std::mutex> lock(mutex); fn(); } diff --git a/src/mbgl/util/run_loop.hpp b/src/mbgl/util/run_loop.hpp index 7f56c18dcd..739ec0ba7a 100644 --- a/src/mbgl/util/run_loop.hpp +++ b/src/mbgl/util/run_loop.hpp @@ -146,7 +146,7 @@ private: void process(); Queue queue; - std::recursive_mutex mutex; + std::mutex mutex; uv::async async; static uv::tls<RunLoop> current; |