summaryrefslogtreecommitdiff
path: root/src/mbgl/util
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-04-23 11:46:22 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-04-28 14:32:24 -0400
commita625ba8a0976ef8417a2609700187c5633be2c58 (patch)
treeee61c1e8b6bde556b2c93f4730ea806547f6090a /src/mbgl/util
parentc84e8862226e6f89538b34fafd592182caf9008b (diff)
downloadqtlocation-mapboxgl-a625ba8a0976ef8417a2609700187c5633be2c58.tar.gz
Remove Map::start/stop
Both Android and iOS now use pause/resume. The map thread is always running, and be able to receive messages. When paused, it will just refuse to render.
Diffstat (limited to 'src/mbgl/util')
-rw-r--r--src/mbgl/util/thread.hpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/mbgl/util/thread.hpp b/src/mbgl/util/thread.hpp
index 9a1a7b0137..2150f5bc3b 100644
--- a/src/mbgl/util/thread.hpp
+++ b/src/mbgl/util/thread.hpp
@@ -89,7 +89,6 @@ private:
std::promise<void> joinable;
std::thread thread;
- std::atomic_bool joined;
Object* object;
RunLoop* loop;
@@ -97,8 +96,7 @@ private:
template <class Object>
template <class... Args>
-Thread<Object>::Thread(const std::string& name, Args&&... args)
- : joined(false) {
+Thread<Object>::Thread(const std::string& name, Args&&... args) {
// Note: We're using std::tuple<> to store the arguments because GCC 4.9 has a bug
// when expanding parameters packs captured in lambdas.
std::tuple<Args...> params = std::forward_as_tuple(::std::forward<Args>(args)...);
@@ -137,7 +135,6 @@ void Thread<Object>::run(P&& params, index_sequence<I...>) {
loop_.run();
joinable.get_future().get();
- joined = true;
}
template <class Object>
@@ -147,15 +144,6 @@ Thread<Object>::~Thread() {
thread.join();
}
-template <class Object>
-void Thread<Object>::pumpingStop(std::function<void ()> cb) {
- loop->stop();
- joinable.set_value();
- while (!joined) {
- cb();
- }
-}
-
}
}