From 6b91d407dea061503f0d5fec5018d2ffbc551793 Mon Sep 17 00:00:00 2001 From: Yancey1989 Date: Tue, 29 May 2018 11:43:04 +0800 Subject: [PATCH] revert variable mutex --- paddle/fluid/framework/variable.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/paddle/fluid/framework/variable.h b/paddle/fluid/framework/variable.h index e7f87ab6f8..067e0c2b83 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 -- GitLab