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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user