提交 6b91d407 编写于 作者: Y Yancey1989

revert variable mutex

上级 60d827a8
......@@ -14,7 +14,6 @@
#pragma once
#include <memory>
#include <mutex> // NOLINT
#include <string>
#include <typeindex>
#include <typeinfo>
......@@ -39,8 +38,6 @@ class Variable {
template <typename T>
T* GetMutable() {
// TODO(Yancey1989): need to make Variable completely thread-safe.
std::unique_lock<std::mutex> lock(mutex_);
if (!IsType<T>()) {
holder_.reset(new PlaceholderImpl<T>(new T()));
}
......@@ -93,7 +90,6 @@ class Variable {
// by its address but not the unreadable name.
friend class Scope;
const std::string* name_;
std::mutex mutex_;
};
} // namespace framework
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册