Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
emplace into threadSet
Browse files Browse the repository at this point in the history
Map thread and Main thread should be separated in Mode::Static now
  • Loading branch information
mikemorris committed Apr 17, 2015
1 parent 7827d49 commit 98c8159
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/mbgl/map/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ class ThreadInfoStore {
void registerThread(Environment* env, ThreadType type, const std::string& name) {
std::lock_guard<std::mutex> lock(mtx);

// FIXME: We should never need to overwrite a thread here and we only allow
// this today because on the Static mode, the Map thread and the Main thread
// are same. Replace this with emplace() when this gets fixed.
threadSet[std::this_thread::get_id()] = ThreadInfo{ env, type, name };
threadSet.emplace(std::this_thread::get_id(), ThreadInfo{ env, type, name });
}

void unregisterThread() {
Expand Down

0 comments on commit 98c8159

Please sign in to comment.