summaryrefslogtreecommitdiff
path: root/include/mbgl/util
diff options
context:
space:
mode:
authorŁukasz Paczos <lukas.paczos@gmail.com>2019-05-21 12:45:01 +0200
committerŁukasz Paczos <lukasz.paczos@mapbox.com>2019-05-22 15:52:55 +0200
commit7d6255c8605bd18a7c7d90de19346392a51c90b7 (patch)
tree65b52ac4f4b4e64598dcc885a161251d62c5d38e /include/mbgl/util
parente79080771b36ad3a4be0dee8ca12032cd1c8488a (diff)
downloadqtlocation-mapboxgl-7d6255c8605bd18a7c7d90de19346392a51c90b7.tar.gz
[core] option to perform platform specific operations when creating/destroying core threads
Diffstat (limited to 'include/mbgl/util')
-rw-r--r--include/mbgl/util/thread.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/mbgl/util/thread.hpp b/include/mbgl/util/thread.hpp
index bc58427349..0e9bd8f759 100644
--- a/include/mbgl/util/thread.hpp
+++ b/include/mbgl/util/thread.hpp
@@ -6,6 +6,7 @@
#include <mbgl/util/platform.hpp>
#include <mbgl/util/run_loop.hpp>
#include <mbgl/util/util.hpp>
+#include <mbgl/platform/thread.hpp>
#include <cassert>
#include <future>
@@ -55,6 +56,7 @@ public:
] () mutable {
platform::setCurrentThreadName(name);
platform::makeThreadLowPriority();
+ platform::attachThread();
util::RunLoop loop_(util::RunLoop::Type::New);
loop = &loop_;
@@ -67,6 +69,7 @@ public:
(void) establishedActor;
loop = nullptr;
+ platform::detachThread();
});
}