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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user