Skip to content

Commit 6b91d40

Browse files
committed
revert variable mutex
1 parent 60d827a commit 6b91d40

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

paddle/fluid/framework/variable.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#pragma once
1515

1616
#include <memory>
17-
#include <mutex> // NOLINT
1817
#include <string>
1918
#include <typeindex>
2019
#include <typeinfo>
@@ -39,8 +38,6 @@ class Variable {
3938

4039
template <typename T>
4140
T* GetMutable() {
42-
// TODO(Yancey1989): need to make Variable completely thread-safe.
43-
std::unique_lock<std::mutex> lock(mutex_);
4441
if (!IsType<T>()) {
4542
holder_.reset(new PlaceholderImpl<T>(new T()));
4643
}
@@ -93,7 +90,6 @@ class Variable {
9390
// by its address but not the unreadable name.
9491
friend class Scope;
9592
const std::string* name_;
96-
std::mutex mutex_;
9793
};
9894

9995
} // namespace framework

0 commit comments

Comments
 (0)