summaryrefslogtreecommitdiff
path: root/src/mbgl/storage
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 /src/mbgl/storage
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 'src/mbgl/storage')
-rw-r--r--src/mbgl/storage/default_file_source.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/storage/default_file_source.cpp b/src/mbgl/storage/default_file_source.cpp
index b46696aaa3..dcd0090da1 100644
--- a/src/mbgl/storage/default_file_source.cpp
+++ b/src/mbgl/storage/default_file_source.cpp
@@ -28,7 +28,7 @@ namespace algo = boost::algorithm;
namespace mbgl {
DefaultFileSource::DefaultFileSource(FileCache* cache, const std::string& root)
- : thread(std::make_unique<util::Thread<Impl>>("FileSource", util::ThreadPriority::Low, cache, root)) {
+ : thread(std::make_unique<util::Thread<Impl>>(util::ThreadContext{"FileSource", util::ThreadType::Unknown, util::ThreadPriority::Low}, cache, root)) {
}
DefaultFileSource::~DefaultFileSource() {