We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60d827a commit 6b91d40Copy full SHA for 6b91d40
paddle/fluid/framework/variable.h
@@ -14,7 +14,6 @@
14
#pragma once
15
16
#include <memory>
17
-#include <mutex> // NOLINT
18
#include <string>
19
#include <typeindex>
20
#include <typeinfo>
@@ -39,8 +38,6 @@ class Variable {
39
38
40
template <typename T>
41
T* GetMutable() {
42
- // TODO(Yancey1989): need to make Variable completely thread-safe.
43
- std::unique_lock<std::mutex> lock(mutex_);
44
if (!IsType<T>()) {
45
holder_.reset(new PlaceholderImpl<T>(new T()));
46
}
@@ -93,7 +90,6 @@ class Variable {
93
90
// by its address but not the unreadable name.
94
91
friend class Scope;
95
92
const std::string* name_;
96
- std::mutex mutex_;
97
};
98
99
} // namespace framework
0 commit comments