diff --git a/paddle/fluid/framework/variable.h b/paddle/fluid/framework/variable.h index e7f87ab6f8b889a7319abb48e7f418bb87d1ca21..067e0c2b8389f88639fd9b95bd680702517efee1 100644 --- a/paddle/fluid/framework/variable.h +++ b/paddle/fluid/framework/variable.h @@ -14,7 +14,6 @@ #pragma once #include -#include // NOLINT #include #include #include @@ -39,8 +38,6 @@ class Variable { template T* GetMutable() { - // TODO(Yancey1989): need to make Variable completely thread-safe. - std::unique_lock lock(mutex_); if (!IsType()) { holder_.reset(new PlaceholderImpl(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