summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2015-06-23 20:08:30 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2015-06-25 16:26:21 +0300
commita8b6b67dfeb79a2e7904a2aec6354161c4eb1b16 (patch)
treeffe6ebd296b440287979f8df74b9f59da0ee998d /platform
parent7bb86368d4730c889f9b1f7007a7bada580db8ea (diff)
downloadqtlocation-mapboxgl-a8b6b67dfeb79a2e7904a2aec6354161c4eb1b16.tar.gz
Introduce the ThreadContext
mbgl::Thread will keep a ThreadContext for each running instance in a thread_local so we don't need to lookup a man in the Environment every time we need some info about the current thread. This patch is moving the ::currentlyOn check used on Debug build from the Environment class to the ThreadContext.
Diffstat (limited to 'platform')
-rw-r--r--platform/default/sqlite_cache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/default/sqlite_cache.cpp b/platform/default/sqlite_cache.cpp
index 06d168ce4e..a2d2c6815d 100644
--- a/platform/default/sqlite_cache.cpp
+++ b/platform/default/sqlite_cache.cpp
@@ -62,7 +62,7 @@ std::string unifyMapboxURLs(const std::string &url) {
using namespace mapbox::sqlite;
SQLiteCache::SQLiteCache(const std::string& path_)
- : thread(std::make_unique<util::Thread<Impl>>("SQLite Cache", util::ThreadPriority::Low, path_)) {
+ : thread(std::make_unique<util::Thread<Impl>>(util::ThreadContext{"SQLite Cache", util::ThreadType::Unknown, util::ThreadPriority::Low}, path_)) {
}
SQLiteCache::~SQLiteCache() = default;